OSDN Git Service

PR fortran/35037
[pf3gnuchains/gcc-fork.git] / gcc / tree-complex.c
index ea0eafc..a1964ee 100644 (file)
@@ -96,6 +96,8 @@ some_nonzerop (tree t)
 
   if (TREE_CODE (t) == REAL_CST)
     zerop = REAL_VALUES_IDENTICAL (TREE_REAL_CST (t), dconst0);
+  else if (TREE_CODE (t) == FIXED_CST)
+    zerop = fixed_zerop (t);
   else if (TREE_CODE (t) == INTEGER_CST)
     zerop = integer_zerop (t);
 
@@ -244,6 +246,17 @@ init_dont_simulate_again (void)
                  saw_a_complex_op = true;
                break;
 
+             case REALPART_EXPR:
+             case IMAGPART_EXPR:
+               /* The total store transformation performed during
+                  gimplification creates such uninitialized loads
+                  and we need to lower the statement to be able
+                  to fix things up.  */
+               if (TREE_CODE (TREE_OPERAND (rhs, 0)) == SSA_NAME
+                   && ssa_undefined_value_p (TREE_OPERAND (rhs, 0)))
+                 saw_a_complex_op = true;
+               break;
+
              default:
                break;
              }