OSDN Git Service

2008-02-17 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 17 Feb 2008 15:06:53 +0000 (15:06 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 17 Feb 2008 15:06:53 +0000 (15:06 +0000)
PR middle-end/35227
* tree-complex.c (init_parameter_lattice_values): Handle parameters
without default definition.

* gcc.dg/torture/pr35227.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132379 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr35227.c [new file with mode: 0644]
gcc/tree-complex.c

index 946eb6a..2b3033e 100644 (file)
@@ -1,5 +1,11 @@
 2008-02-17  Richard Guenther  <rguenther@suse.de>
 
 2008-02-17  Richard Guenther  <rguenther@suse.de>
 
+       PR middle-end/35227
+       * tree-complex.c (init_parameter_lattice_values): Handle parameters
+       without default definition.
+
+2008-02-17  Richard Guenther  <rguenther@suse.de>
+
        PR tree-optimization/35231
        * tree-vrp.c (register_edge_assert_for): Do not assume A == 0
        if A | B != 1.
        PR tree-optimization/35231
        * tree-vrp.c (register_edge_assert_for): Do not assume A == 0
        if A | B != 1.
index c167949..7f8b32a 100644 (file)
@@ -1,5 +1,10 @@
 2008-02-17  Richard Guenther  <rguenther@suse.de>
 
 2008-02-17  Richard Guenther  <rguenther@suse.de>
 
+       PR middle-end/35227
+       * gcc.dg/torture/pr35227.c: New testcase.
+
+2008-02-17  Richard Guenther  <rguenther@suse.de>
+
        PR tree-optimization/35231
        * gcc.c-torture/execute/pr35231.c: New testcase.
 
        PR tree-optimization/35231
        * gcc.c-torture/execute/pr35231.c: New testcase.
 
diff --git a/gcc/testsuite/gcc.dg/torture/pr35227.c b/gcc/testsuite/gcc.dg/torture/pr35227.c
new file mode 100644 (file)
index 0000000..d951d25
--- /dev/null
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+
+mandel(double _Complex C)
+{
+  int py;
+  C = (__extension__ 1.0iF) * (double)py;
+  return cabs(C);  /* { dg-warning "incompatible" } */
+}
+
index a1964ee..b9c7ebc 100644 (file)
@@ -161,15 +161,14 @@ is_complex_reg (tree lhs)
 static void
 init_parameter_lattice_values (void)
 {
 static void
 init_parameter_lattice_values (void)
 {
-  tree parm;
+  tree parm, ssa_name;
 
   for (parm = DECL_ARGUMENTS (cfun->decl); parm ; parm = TREE_CHAIN (parm))
 
   for (parm = DECL_ARGUMENTS (cfun->decl); parm ; parm = TREE_CHAIN (parm))
-    if (is_complex_reg (parm) && var_ann (parm) != NULL)
-      {
-       tree ssa_name = gimple_default_def (cfun, parm);
-       VEC_replace (complex_lattice_t, complex_lattice_values,
-                    SSA_NAME_VERSION (ssa_name), VARYING);
-      }
+    if (is_complex_reg (parm)
+       && var_ann (parm) != NULL
+       && (ssa_name = gimple_default_def (cfun, parm)) != NULL_TREE)
+      VEC_replace (complex_lattice_t, complex_lattice_values,
+                  SSA_NAME_VERSION (ssa_name), VARYING);
 }
 
 /* Initialize DONT_SIMULATE_AGAIN for each stmt and phi.  Return false if
 }
 
 /* Initialize DONT_SIMULATE_AGAIN for each stmt and phi.  Return false if