aboutsummaryrefslogtreecommitdiff
path: root/gcc/recog.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/recog.c')
-rw-r--r--gcc/recog.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/recog.c b/gcc/recog.c
index 9bbd10b..746c0f9 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -409,8 +409,11 @@ validate_replace_rtx_1 (loc, from, to, object)
register int i, j;
register const char *fmt;
register rtx x = *loc;
- enum rtx_code code = GET_CODE (x);
+ enum rtx_code code;
+ if (!x)
+ return;
+ code = GET_CODE (x);
/* X matches FROM if it is the same rtx or they are both referring to the
same register in the same mode. Avoid calling rtx_equal_p unless the
operands look similar. */