This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Tree checking failure in C++
- To: gcc-patches at gcc dot gnu dot org
- Subject: PATCH: Tree checking failure in C++
- From: Andrew Haley <aph at cygnus dot co dot uk>
- Date: Tue, 24 Oct 2000 13:49:25 +0100 (BST)
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);