diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2012-04-25 19:08:23 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2012-04-25 12:08:23 -0700 |
commit | ff5f00c3a14ee1c74acce362af4aa879a39f50fb (patch) | |
tree | b869762bd451f6783651bf15f24f8f5670da02e9 | |
parent | 862023d77a81fc9000799ed3bbdcf86734d15ced (diff) | |
download | gcc-ff5f00c3a14ee1c74acce362af4aa879a39f50fb.zip gcc-ff5f00c3a14ee1c74acce362af4aa879a39f50fb.tar.gz gcc-ff5f00c3a14ee1c74acce362af4aa879a39f50fb.tar.bz2 |
Assert dbx_reg_number doesn't return INVALID_REGNUM
PR debug/52857
* dwarf2out.c (dbx_reg_number): Assert return value !=
INVALID_REGNUM.
From-SVN: r186837
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f51ccbc..820ba1b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-04-25 H.J. Lu <hongjiu.lu@intel.com> + + PR debug/52857 + * dwarf2out.c (dbx_reg_number): Assert return value != + INVALID_REGNUM. + 2012-04-25 Jakub Jelinek <jakub@redhat.com> * common.opt (flag_debug_types_section): Default to 0. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 1240ddb..766edba 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -10167,7 +10167,9 @@ dbx_reg_number (const_rtx rtl) } #endif - return DBX_REGISTER_NUMBER (regno); + regno = DBX_REGISTER_NUMBER (regno); + gcc_assert (regno != INVALID_REGNUM); + return regno; } /* Optionally add a DW_OP_piece term to a location description expression. |