OSDN Git Service

PR testsuite/36057
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa-phiopt.c
index e51bac6..fbc7a68 100644 (file)
@@ -463,6 +463,11 @@ conditional_replacement (basic_block cond_bb, basic_block middle_bb,
   tree new_var = NULL;
   tree new_var1;
 
+  /* FIXME: Gimplification of complex type is too hard for now.  */
+  if (TREE_CODE (TREE_TYPE (arg0)) == COMPLEX_TYPE
+      || TREE_CODE (TREE_TYPE (arg1)) == COMPLEX_TYPE)
+    return false;
+
   /* The PHI arguments have the constants 0 and 1, then convert
      it to the conditional.  */
   if ((integer_zerop (arg0) && integer_onep (arg1))
@@ -587,8 +592,7 @@ conditional_replacement (basic_block cond_bb, basic_block middle_bb,
          /* Only "real" casts are OK here, not everything that is
             acceptable to is_gimple_cast.  Make sure we don't do
             anything stupid here.  */
-         gcc_assert (TREE_CODE (cond) == NOP_EXPR
-                     || TREE_CODE (cond) == CONVERT_EXPR);
+         gcc_assert (CONVERT_EXPR_P (cond));
 
          op0 = TREE_OPERAND (cond, 0);
          tmp = create_tmp_var (TREE_TYPE (op0), NULL);
@@ -1352,8 +1356,10 @@ gate_phiopt (void)
   return 1;
 }
 
-struct tree_opt_pass pass_phiopt =
+struct gimple_opt_pass pass_phiopt =
 {
+ {
+  GIMPLE_PASS,
   "phiopt",                            /* name */
   gate_phiopt,                         /* gate */
   tree_ssa_phiopt,                     /* execute */
@@ -1369,8 +1375,8 @@ struct tree_opt_pass pass_phiopt =
     | TODO_ggc_collect
     | TODO_verify_ssa
     | TODO_verify_flow
-    | TODO_verify_stmts,               /* todo_flags_finish */
-  0                                    /* letter */
+    | TODO_verify_stmts                        /* todo_flags_finish */
+ }
 };
 
 static bool
@@ -1379,8 +1385,10 @@ gate_cselim (void)
   return flag_tree_cselim;
 }
 
-struct tree_opt_pass pass_cselim =
+struct gimple_opt_pass pass_cselim =
 {
+ {
+  GIMPLE_PASS,
   "cselim",                            /* name */
   gate_cselim,                         /* gate */
   tree_ssa_cs_elim,                    /* execute */
@@ -1396,6 +1404,6 @@ struct tree_opt_pass pass_cselim =
     | TODO_ggc_collect
     | TODO_verify_ssa
     | TODO_verify_flow
-    | TODO_verify_stmts,               /* todo_flags_finish */
-  0                                    /* letter */
+    | TODO_verify_stmts                        /* todo_flags_finish */
+ }
 };