This fixes an ICE that occurs when valueziation returns NULL and
we are looking at single-rhs REALPART_EXPR.  We should check
for is_gimple_min_invariant before valueization.

Bootstrapped on x86_64-unknown-linux-gnu, applied.

Richard.

2014-10-14  Richard Biener  <rguent...@suse.de>

        * genmatch.c (dt_operand::gen_gimple_expr): Check for an
        invariant operand before valueizing it.

Index: gcc/genmatch.c
===================================================================
--- gcc/genmatch.c      (revision 216197)
+++ gcc/genmatch.c      (working copy)
@@ -1566,8 +1566,8 @@ dt_operand::gen_gimple_expr (FILE *f)
              fprintf (f, "tree %s = TREE_OPERAND (gimple_assign_rhs1 
(def_stmt), %i);\n",
                       child_opname, i);
              fprintf (f, "if ((TREE_CODE (%s) == SSA_NAME\n"
-                      "&& (%s = do_valueize (valueize, %s)))\n"
                       "|| is_gimple_min_invariant (%s))\n"
+                      "&& (%s = do_valueize (valueize, %s)))\n"
                       "{\n", child_opname, child_opname, child_opname,
                       child_opname);
              continue;

Reply via email to