[Bug middle-end/37343] [4.4 Regression] ICE in expand_expr_real_1, at expr.c:7290

hubicka at ucw dot cz gcc-bugzilla@gcc.gnu.org
Wed Sep 3 14:31:00 GMT 2008



------- 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



More information about the Gcc-bugs mailing list