This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: --enable-werror-always fails function.o for any non-pic target


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]