summaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 1240ddb5637..766edbad130 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.