aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Haley <aph@cygnus.co.uk>2000-10-24 20:06:13 +0000
committerAndrew Haley <aph@gcc.gnu.org>2000-10-24 20:06:13 +0000
commit5129d2ceee602f1539c4024d081485ea0a7c5f7c (patch)
tree8e7b457d212bf02a23d637d3f5aff2c2177fb332 /gcc
parentdcc41852e10b89db9b47fdf02caf79b8ddb3b0bd (diff)
downloadgcc-5129d2ceee602f1539c4024d081485ea0a7c5f7c.zip
gcc-5129d2ceee602f1539c4024d081485ea0a7c5f7c.tar.gz
gcc-5129d2ceee602f1539c4024d081485ea0a7c5f7c.tar.bz2
expr.c (do_store_flag): Don't crash if either side of a comparison is error_mark_node.
2000-10-24 Andrew Haley <aph@cygnus.co.uk> * expr.c (do_store_flag): Don't crash if either side of a comparison is error_mark_node. From-SVN: r37036
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/expr.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 67586d8..729e889 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2000-10-24 Andrew Haley <aph@cygnus.co.uk>
+
+ * expr.c (do_store_flag): Don't crash if either side of a
+ comparison is error_mark_node.
+
2000-10-24 Jakub Jelinek <jakub@redhat.com>
* sibcall.c (purge_mem_unchanging_flag): New function.
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);