aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr26869.c7
-rw-r--r--gcc/tree-complex.c2
4 files changed, 20 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0f66eac..171808d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2006-04-24 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/26869
+ * tree-complex.c (update_parameter_components): Don't handle
+ unused parameters which have no default def.
+
2006-04-24 Andrew Pinski <pinskia@gcc.gnu.org>
Richard Guenther <rguenther@suse.de>
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 326c31d..3c6b413 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2006-04-24 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/26869
+ * gcc.dg/torture/pr26869.c: New testcase.
+
2006-04-24 Andrew Pinski <pinskia@gcc.gnu.org>
Richard Guenther <rguenther@suse.de>
diff --git a/gcc/testsuite/gcc.dg/torture/pr26869.c b/gcc/testsuite/gcc.dg/torture/pr26869.c
new file mode 100644
index 0000000..6743319
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr26869.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+
+_Complex float f (_Complex float b, _Complex float c)
+{
+ _Complex float a = 1.0 + 0.0i;
+ return a / c;
+}
diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c
index 0529131..65466bb 100644
--- a/gcc/tree-complex.c
+++ b/gcc/tree-complex.c
@@ -652,6 +652,8 @@ update_parameter_components (void)
type = TREE_TYPE (type);
ssa_name = default_def (parm);
+ if (!ssa_name)
+ continue;
r = build1 (REALPART_EXPR, type, ssa_name);
i = build1 (IMAGPART_EXPR, type, ssa_name);