re PR middle-end/44765 (gen_rtx_REG can make out-of-bounds access for INVALID_REGNUM)
PR middle-end/44765 * emit-rtl.c (gen_rtx_REG): Before using PIC_OFFSET_TABLE_REGNUM as an index, check it is not INVALID_REGNUM. From-SVN: r166307
This commit is contained in:
parent
0532869d05
commit
bf9412cda7
2 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2010-10-04 Joern Rennecke <amylaar@spamcop.net>
|
||||
|
||||
PR middle-end/44765
|
||||
* emit-rtl.c (gen_rtx_REG): Before using PIC_OFFSET_TABLE_REGNUM
|
||||
as an index, check it is not INVALID_REGNUM.
|
||||
|
||||
2010-11-04 Ira Rosen <irar@il.ibm.com>
|
||||
|
||||
PR tree-optimization/46213
|
||||
|
|
|
@ -603,6 +603,7 @@ gen_rtx_REG (enum machine_mode mode, unsigned int regno)
|
|||
return return_address_pointer_rtx;
|
||||
#endif
|
||||
if (regno == (unsigned) PIC_OFFSET_TABLE_REGNUM
|
||||
&& PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM
|
||||
&& fixed_regs[PIC_OFFSET_TABLE_REGNUM])
|
||||
return pic_offset_table_rtx;
|
||||
if (regno == STACK_POINTER_REGNUM)
|
||||
|
|
Loading…
Add table
Reference in a new issue