[PATCH] Improve dump files for SRA early candidate check

Richard Guenther richard.guenther@gmail.com
Thu Jun 23 10:23:00 GMT 2011


On Thu, Jun 23, 2011 at 8:07 AM, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> +         if (!host_integerp (DECL_FIELD_OFFSET (fld), 1))
>> +           {
>> +             *msg = "structure field offset not host integer"; /* ??? */
>> +             return true;
>> +           }
>
> Offsets can be variable, like sizes, in Ada for example.
>
>>        if (TYPE_VOLATILE (et))
>> -     return true;
>> +     {
>> +       *msg = "array type is volatile";
>> +       return true;
>> +     }
>
> "element type is volatile"
>
>> +      if (!COMPLETE_TYPE_P (type))
>> +        {
>> +          reject (var, "is not complete");
>> +       continue;
>> +        }
>
> "has incomplete type" is better I think
>
>> +      if (!host_integerp (TYPE_SIZE (type), 1))
>> +        {
>> +          reject (var, "not host integer");
>> +       continue;
>> +        }
>
> missing "type size"
>
>> +      if (tree_low_cst (TYPE_SIZE (type), 1) == 0)
>> +        {
>> +          reject (var, "tree_low_cst is zero"); /* what is that? */
>> +          continue;
>> +        }
>
> This is equivalent to saying that the type size is zero.

Ok with the suggested changes and the questioning comments removed.

Thanks,
Richard.

> --
> Eric Botcazou
>



More information about the Gcc-patches mailing list