OSDN Git Service

PR middle-end/38969
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 27 Jan 2009 10:18:54 +0000 (10:18 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 27 Jan 2009 10:18:54 +0000 (10:18 +0000)
* 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.

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

gcc/ChangeLog
gcc/calls.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr38969.c [new file with mode: 0644]

index 3e7865f..d2c1f4b 100644 (file)
@@ -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.
index a75e3b3..e6e882f 100644 (file)
@@ -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);
index 7718c91..9b9f8ed 100644 (file)
@@ -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.
        * 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 (file)
index 0000000..328bdf4
--- /dev/null
@@ -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;
+}