diff options
author | Joern Rennecke <amylaar@spamcop.net> | 2010-11-04 12:41:07 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 2010-11-04 12:41:07 +0000 |
commit | bf9412cda74bd81b71a2d459fae173a4ed974c07 (patch) | |
tree | 3d9f4fc1db7830522c30e87f4e92d4f87476899a /gcc | |
parent | 0532869d0595b5ae8a45a6ca9eceab25fa8b2958 (diff) | |
download | gcc-bf9412cda74bd81b71a2d459fae173a4ed974c07.zip gcc-bf9412cda74bd81b71a2d459fae173a4ed974c07.tar.gz gcc-bf9412cda74bd81b71a2d459fae173a4ed974c07.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/emit-rtl.c | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2cfb60a..213846d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index eb4ea2a..60fe39b 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -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) |