From 5129d2ceee602f1539c4024d081485ea0a7c5f7c Mon Sep 17 00:00:00 2001 From: Andrew Haley Date: Tue, 24 Oct 2000 20:06:13 +0000 Subject: expr.c (do_store_flag): Don't crash if either side of a comparison is error_mark_node. 2000-10-24 Andrew Haley * expr.c (do_store_flag): Don't crash if either side of a comparison is error_mark_node. From-SVN: r37036 --- gcc/expr.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/expr.c') diff --git a/gcc/expr.c b/gcc/expr.c index b030c7a..06aebb6 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -10133,6 +10133,11 @@ do_store_flag (exp, target, mode, only_cheap) arg0 = TREE_OPERAND (exp, 0); arg1 = TREE_OPERAND (exp, 1); + + /* Don't crash if the comparison was erroneous. */ + if (arg0 == error_mark_node || arg1 == error_mark_node) + return const0_rtx; + type = TREE_TYPE (arg0); operand_mode = TYPE_MODE (type); unsignedp = TREE_UNSIGNED (type); -- cgit v1.1