This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lno-branch]: Patch to fix bootstrap problem on darwin
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Pop Sébastian <pop at gauvain dot u-strasbg dot fr>,Dorit Naishlos <DORIT at il dot ibm dot com>
- Date: Sun, 11 Jan 2004 20:16:43 -0500
- Subject: [lno-branch]: Patch to fix bootstrap problem on darwin
This at least gets past the first failure. tree_fold_int_plus can
return a NON_LVALUE_EXPR
Index: tree-chrec.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-chrec.c,v
retrieving revision 1.1.2.2
diff -u -3 -p -r1.1.2.2 tree-chrec.c
--- tree-chrec.c 9 Jan 2004 12:15:53 -0000 1.1.2.2
+++ tree-chrec.c 12 Jan 2004 01:16:25 -0000
@@ -990,7 +990,11 @@ chrec_fold_plus (tree op0,
case PARM_DECL:
if (TREE_CODE (TREE_TYPE (op0)) != REAL_TYPE
&& TREE_CODE (TREE_TYPE (op0)) != REAL_TYPE)
- return tree_fold_int_plus (op0, op1);
+ {
+ tree temp = tree_fold_int_plus (op0, op1);
+ if (TREE_CODE (temp) == NON_LVALUE_EXPR)
+ return TREE_OPERAND (temp, 0);
+ }
case REAL_CST:
return build (PLUS_EXPR, TREE_TYPE (op1),