[PATCH] Fix compile time warning caused by PIC_OFFSET_TABLE_REGNUM

Jeff Law law@redhat.com
Tue Sep 23 20:59:00 GMT 2014

On 09/23/14 13:15, Jiong Wang wrote:
> PIC_OFFSET_TABLE_REGNUM is default to be INVALID_NUM, we need to make sure
> it's not used as unsigned type register index, otherwise there will be
> array
> index out of bound warning which will be treated as error.
> the code in shrink-wrap.c is not guarded by this check which will cause
> trouble for
> any target that define PIC_OFFSET_TABLE_REGNUM as INVALID_REGNUM, for
> example aarch64.
> (sorry, my BOOT_CFLAGS was -O2 -w -fdump-rtl-pro_and_epilogue which
> hidden this issue...)
> ok for trunk as obivious?
> Thanks.
> gcc/
>    * shrink-wrap.c (try_shrink_wrapping): Check PIC_OFFSET_TABLE_REGNUM

More information about the Gcc-patches mailing list