aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2009-01-27 11:18:54 +0100
committerUros Bizjak <uros@gcc.gnu.org>2009-01-27 11:18:54 +0100
commit576de5cb6e4c42c549138a661792e1f7efc81724 (patch)
treeb5e870d2cda4c8a982b959f18c9a1d1e84f20b6e
parentf22167fdbf6231b2a4348e2599c4128dabdd5ad7 (diff)
downloadgcc-576de5cb6e4c42c549138a661792e1f7efc81724.zip
gcc-576de5cb6e4c42c549138a661792e1f7efc81724.tar.gz
gcc-576de5cb6e4c42c549138a661792e1f7efc81724.tar.bz2
re PR middle-end/38969 (-foptimize-sibling-calls generates wrong code on alpha)
PR middle-end/38969 * calls.c (initialize_argument_information): Do not wrap complex arguments in SAVE_EXPR. testsuite/ChangeLog: PR middle-end/38969 * gcc.c-torture/execute/pr38969.c: New test. From-SVN: r143699
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/calls.c1
-rw-r--r--gcc/testsuite/ChangeLog9
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr38969.c25
4 files changed, 38 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3e7865f..d2c1f4b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2009-01-27 Uros Bizjak <ubizjak@gmail.com>
+
+ PR middle-end/38969
+ * calls.c (initialize_argument_information): Do not wrap complex
+ arguments in SAVE_EXPR.
+
2009-01-26 Andreas Tobler <a.tobler@schweiz.org>
* config/t-vxworks (LIBGCC2_INCLUDES): Fix typo.
diff --git a/gcc/calls.c b/gcc/calls.c
index a75e3b3..e6e882f 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -992,7 +992,6 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED,
&& targetm.calls.split_complex_arg (argtype))
{
tree subtype = TREE_TYPE (argtype);
- arg = save_expr (arg);
args[j].tree_value = build1 (REALPART_EXPR, subtype, arg);
j += inc;
args[j].tree_value = build1 (IMAGPART_EXPR, subtype, arg);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7718c91..9b9f8ed 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,7 +1,12 @@
+2009-01-27 Uros Bizjak <ubizjak@gmail.com>
+
+ PR middle-end/38969
+ * gcc.c-torture/execute/pr38969.c: New test.
+
2009-01-26 Adam Nemet <anemet@caviumnetworks.com>
PR testsuite/38864
- * gcc.target/mips/fixed-vector-type.c: Add target { fixed_point}
+ * gcc.target/mips/fixed-vector-type.c: Add target { fixed_point }
to dg-do compile.
* gcc.target/mips/fixed-scalar-type.c: Likewise.
* gcc.target/mips/dpaq_sa_l_w.c: Likewise.
@@ -143,7 +148,7 @@
* gfortran.dg/host_assoc_function_7.f90: New test
2009-01-20 Andrew Pinski <andrew_pinski@playstation.sony.com>
- Richard Guenther <rguenther@suse.de>
+ Richard Guenther <rguenther@suse.de>
PR tree-optimization/38747
PR tree-optimization/38748
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr38969.c b/gcc/testsuite/gcc.c-torture/execute/pr38969.c
new file mode 100644
index 0000000..328bdf4
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr38969.c
@@ -0,0 +1,25 @@
+__complex__ float
+__attribute__ ((noinline)) foo (__complex__ float x)
+{
+ return x;
+}
+
+__complex__ float
+__attribute__ ((noinline)) bar (__complex__ float x)
+{
+ return foo (x);
+}
+
+int main()
+{
+ __complex__ float a, b;
+ __real__ a = 9;
+ __imag__ a = 42;
+
+ b = bar (a);
+
+ if (a != b)
+ abort ();
+
+ return 0;
+}