PATCH: Tree checking failure in C++

Andrew Haley aph@cygnus.co.uk
Tue Oct 24 05:49:00 GMT 2000


This is for a tree checking abort.  

Unfortunately, I think my test case is part of a commercial testsuite
so I don't know if I can post it here.

Andrew.


2000-10-24  Andrew Haley  <aph@cygnus.co.uk>

	* expr.c (do_store_flag): Don't crash if either side of a
	comparison is an ERROR_MARK.

Index: gcc/expr.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/expr.c,v
retrieving revision 1.271
diff -p -2 -c -r1.271 expr.c
*** expr.c      2000/10/23 04:40:25     1.271
--- expr.c      2000/10/24 12:43:41
*************** do_store_flag (exp, target, mode, only_c
*** 10134,10137 ****
--- 10134,10142 ----
    arg0 = TREE_OPERAND (exp, 0);
    arg1 = TREE_OPERAND (exp, 1);
+ 
+   /* Don't crash if the comparison was erroneous.  */
+   if (TREE_CODE (arg0) == ERROR_MARK || TREE_CODE (arg1) == ERROR_MARK)
+     return const0_rtx;
+ 
    type = TREE_TYPE (arg0);
    operand_mode = TYPE_MODE (type);


More information about the Gcc-patches mailing list