summaryrefslogtreecommitdiff
path: root/gcc/print-rtl.c
diff options
context:
space:
mode:
authoramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-04 21:05:46 +0000
committeramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-04 21:05:46 +0000
commit3546bf8dd55772566748690334e2cc26523054f3 (patch)
tree53b6e7dea7473fd468fa2d51f8e7aa9570360c7b /gcc/print-rtl.c
parent8b9506fe7db5f4157760f2317b16cae1f7353d2a (diff)
downloadgcc-3546bf8dd55772566748690334e2cc26523054f3.tar.gz
* reload1.c (gen_reload): Don't use REGNO on SUBREGs.
* print-rtl.c (print_rtx): Don't segfault on negative regno. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180983 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/print-rtl.c')
-rw-r--r--gcc/print-rtl.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c
index db9c0fbbdd0..edeeefa6071 100644
--- a/gcc/print-rtl.c
+++ b/gcc/print-rtl.c
@@ -466,11 +466,10 @@ print_rtx (const_rtx in_rtx)
const char *name;
#ifndef GENERATOR_FILE
- if (REG_P (in_rtx) && value < FIRST_PSEUDO_REGISTER)
- fprintf (outfile, " %d %s", REGNO (in_rtx),
- reg_names[REGNO (in_rtx)]);
+ if (REG_P (in_rtx) && (unsigned) value < FIRST_PSEUDO_REGISTER)
+ fprintf (outfile, " %d %s", value, reg_names[value]);
else if (REG_P (in_rtx)
- && value <= LAST_VIRTUAL_REGISTER)
+ && (unsigned) value <= LAST_VIRTUAL_REGISTER)
{
if (value == VIRTUAL_INCOMING_ARGS_REGNUM)
fprintf (outfile, " %d virtual-incoming-args", value);