[Bug tree-optimization/39713] [4.4/4.5 Regression] ICE in get_expr_value_id

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Apr 10 18:43:00 GMT 2009



------- Comment #2 from rguenth at gcc dot gnu dot org  2009-04-10 18:43 -------
I am testing the following

Index: tree-ssa-sccvn.c
===================================================================
--- tree-ssa-sccvn.c    (revision 145876)
+++ tree-ssa-sccvn.c    (working copy)
@@ -257,9 +257,10 @@ vn_get_expr_for (tree name)
   switch (TREE_CODE_CLASS (gimple_assign_rhs_code (def_stmt)))
     {
     case tcc_reference:
-      if (gimple_assign_rhs_code (def_stmt) == VIEW_CONVERT_EXPR
-         || gimple_assign_rhs_code (def_stmt) == REALPART_EXPR
-         || gimple_assign_rhs_code (def_stmt) == IMAGPART_EXPR)
+      if ((gimple_assign_rhs_code (def_stmt) == VIEW_CONVERT_EXPR
+          || gimple_assign_rhs_code (def_stmt) == REALPART_EXPR
+          || gimple_assign_rhs_code (def_stmt) == IMAGPART_EXPR)
+         && TREE_CODE (gimple_assign_rhs1 (def_stmt)) == SSA_NAME)
        expr = fold_build1 (gimple_assign_rhs_code (def_stmt),
                            gimple_expr_type (def_stmt),
                            TREE_OPERAND (gimple_assign_rhs1 (def_stmt), 0));


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39713



More information about the Gcc-bugs mailing list