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

2011-11-04 Thread Ian Lance Taylor
DJ Delorie writes: >> Does it help if we change >> if (pic_offset_table_rtx) >> to >> if (PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM) > > That seems to work. That patch is fine if it bootstraps. Ian

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

2011-11-04 Thread Andrew Pinski
On Fri, Nov 4, 2011 at 6:01 PM, DJ Delorie 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

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

2011-11-04 Thread DJ Delorie
> Does it help if we change > if (pic_offset_table_rtx) > to > if (PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM) That seems to work.

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

2011-11-04 Thread Ian Lance Taylor
DJ Delorie writes: >> > 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

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

2011-11-04 Thread DJ Delorie
> > 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

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

2011-11-04 Thread Ian Lance Taylor
DJ Delorie writes: > gcc/function.c: In function 'thread_prologue_and_epilogue_insns': > gcc/regs.h:322:34: error: array subscript is above array bounds > [-Werror=array-bounds] > > function.c has this: > > if (pic_offset_table_rtx) > add_to_hard_reg_set (&set_up_by_prologue, Pmode,

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

2011-11-04 Thread DJ Delorie
For example, rx-elf... gcc/function.c: In function 'thread_prologue_and_epilogue_insns': gcc/regs.h:322:34: error: array subscript is above array bounds [-Werror=array-bounds] function.c has this: if (pic_offset_table_rtx) add_to_hard_reg_set (&set_up_by_prologue, Pmode,