From: Uros Bizjak Date: Tue, 27 Jan 2009 10:18:54 +0000 (+0100) Subject: re PR middle-end/38969 (-foptimize-sibling-calls generates wrong code on alpha) X-Git-Tag: releases/gcc-4.4.0~736 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=576de5cb6e4c42c549138a661792e1f7efc81724;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3e7865f1313a..d2c1f4bfeaa9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-01-27 Uros Bizjak + + PR middle-end/38969 + * calls.c (initialize_argument_information): Do not wrap complex + arguments in SAVE_EXPR. + 2009-01-26 Andreas Tobler * config/t-vxworks (LIBGCC2_INCLUDES): Fix typo. diff --git a/gcc/calls.c b/gcc/calls.c index a75e3b365698..e6e882f24b1e 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 7718c9187e3a..9b9f8ed0dfc0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,7 +1,12 @@ +2009-01-27 Uros Bizjak + + PR middle-end/38969 + * gcc.c-torture/execute/pr38969.c: New test. + 2009-01-26 Adam Nemet 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 - Richard Guenther + Richard Guenther 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 000000000000..328bdf4474b6 --- /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; +}