This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/33423] [4.2/4.3 regression]: internal compiler error: in expand_expr_real_1, at expr.c:8670
- From: "hjl at lucon dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Sep 2007 19:24:26 -0000
- Subject: [Bug middle-end/33423] [4.2/4.3 regression]: internal compiler error: in expand_expr_real_1, at expr.c:8670
- References: <bug-33423-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from hjl at lucon dot org 2007-09-15 19:24 -------
This patch works for the testcase.
--- gcc/expr.c.chk 2007-09-07 07:53:42.000000000 -0700
+++ gcc/expr.c 2007-09-15 12:21:57.000000000 -0700
@@ -9117,7 +9117,6 @@ expand_expr_real_1 (tree exp, rtx target
case BIND_EXPR:
case INIT_EXPR:
case CONJ_EXPR:
- case COMPOUND_EXPR:
case PREINCREMENT_EXPR:
case PREDECREMENT_EXPR:
case POSTINCREMENT_EXPR:
@@ -9129,6 +9128,15 @@ expand_expr_real_1 (tree exp, rtx target
/* Lowered by gimplify.c. */
gcc_unreachable ();
+ case COMPOUND_EXPR:
+ while (TREE_CODE (exp) == COMPOUND_EXPR)
+ {
+ expand_expr (TREE_OPERAND (exp, 0), const0_rtx, VOIDmode,
+ EXPAND_NORMAL);
+ exp = TREE_OPERAND (exp, 1);
+ }
+ return expand_expr (exp, target, mode, EXPAND_NORMAL);
+
case CHANGE_DYNAMIC_TYPE_EXPR:
/* This is ignored at the RTL level. The tree level set
DECL_POINTER_ALIAS_SET of any variable to be 0, which is
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33423