This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/37343] [4.4 Regression] ICE in expand_expr_real_1, at expr.c:7290
- From: "hubicka at ucw dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Sep 2008 14:30:22 -0000
- Subject: [Bug middle-end/37343] [4.4 Regression] ICE in expand_expr_real_1, at expr.c:7290
- References: <bug-37343-12387@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from hubicka at ucw dot cz 2008-09-03 14:30 -------
Subject: Re: [4.4 Regression] ICE in expand_expr_real_1, at expr.c:7290
Hi,
this is switch conversion bug. It attempts to convert the switch and
construct static array with &function_parameter in initializer that
naturally is wrong.
I am testing the following fix:
Index: tree-switch-conversion.c
===================================================================
--- tree-switch-conversion.c (revision 139938)
+++ tree-switch-conversion.c (working copy)
@@ -298,7 +298,7 @@ check_final_bb (void)
if ((bb == info.switch_bb
|| (single_pred_p (bb) && single_pred (bb) == info.switch_bb))
- && !is_gimple_min_invariant (gimple_phi_arg_def (phi, i)))
+ && !is_gimple_ip_invariant (gimple_phi_arg_def (phi, i)))
{
info.reason = " Non-invariant value from a case\n";
return false; /* Non-invariant argument. */
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37343