--enable-werror-always fails function.o for any non-pic target
Andrew Pinski
pinskia@gmail.com
Sat Nov 5 01:18:00 GMT 2011
On Fri, Nov 4, 2011 at 6:01 PM, DJ Delorie <dj@redhat.com> wrote:
>
>> > if (pic_offset_table_rtx)
>> > add_to_hard_reg_set (&set_up_by_prologue, Pmode,
>> > PIC_OFFSET_TABLE_REGNUM);
>>
>> But if PIC_OFFSET_TABLE_REGNUM == INVALID_REGNUM, then
>> pic_offset_table_rtx should be NULL_RTX.
>
> It is, but is gcc smart enough to know that causal relationship?
No because the setting of pic_offset_table_rtx is in emit-rtl.c.
Maybe it is just better to do:
if ((unsigned) PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM)
add_to_hard_reg_set (&set_up_by_prologue, Pmode,
PIC_OFFSET_TABLE_REGNUM);
in function.c.
Thanks,
Andrew Pinski
More information about the Gcc
mailing list