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
This commit is contained in:
H.J. Lu 2012-04-25 19:08:23 +00:00 committed by H.J. Lu
parent 862023d77a
commit ff5f00c3a1
2 changed files with 9 additions and 1 deletions

View File

@ -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.

View File

@ -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.