From 22251f806bda549a6d6a740a738ad0ca405a4f52 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Mon, 31 Jul 2000 08:37:30 +0000 Subject: [PATCH] * recog.c (validate_replace_rtx_1): Do not abort for (nil) expression. From-SVN: r35368 --- gcc/ChangeLog | 4 ++++ gcc/recog.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5c5ec118f75..4904cd3ff40 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Mon Jul 31 10:36:38 MET DST 2000 Jan Hubicka + + * recog.c (validate_replace_rtx_1): Do not abort for (nil) expression. + 2000-07-31 Geoff Keating * c-parse.in (extdefs): Call ggc_collect between external diff --git a/gcc/recog.c b/gcc/recog.c index 9bbd10b3ddd..746c0f9b612 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. */ -- 2.30.2