mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-26 07:45:31 +08:00
re PR tree-optimization/24365 (statement makes a memory store with complex)
2006-01-13 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/24365 * tree-inline.c (declare_return_variable): If the return variable was marked as a non gimple complex, set the return slot variable to be a non gimple comple variable. 2006-01-13 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/24365 * g++.dg/opt/complex5.C: New test. From-SVN: r109667
This commit is contained in:
parent
690c6eacb1
commit
22918034f8
@ -1,3 +1,10 @@
|
|||||||
|
2006-01-13 Andrew Pinski <pinskia@physics.uc.edu>
|
||||||
|
|
||||||
|
PR tree-opt/24365
|
||||||
|
* tree-inline.c (declare_return_variable): If the return variable
|
||||||
|
was marked as a non gimple complex, set the return slot variable
|
||||||
|
to be a non gimple comple variable.
|
||||||
|
|
||||||
2006-01-13 Richard Guenther <rguenther@suse.de>
|
2006-01-13 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
* builtins.c (expand_builtin_sincos): New function.
|
* builtins.c (expand_builtin_sincos): New function.
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2006-01-13 Andrew Pinski <pinskia@physics.uc.edu>
|
||||||
|
|
||||||
|
PR tree-opt/24365
|
||||||
|
* g++.dg/opt/complex5.C: New test.
|
||||||
|
|
||||||
2006-01-13 Richard Guenther <rguenther@suse.de>
|
2006-01-13 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
* gcc.target/i386/387-9.c: New testcase.
|
* gcc.target/i386/387-9.c: New testcase.
|
||||||
|
16
gcc/testsuite/g++.dg/opt/complex5.C
Normal file
16
gcc/testsuite/g++.dg/opt/complex5.C
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// PR 24365
|
||||||
|
// { dg-do compile }
|
||||||
|
// { dg-options "-O2" }
|
||||||
|
|
||||||
|
typedef __complex__ double cdouble;
|
||||||
|
inline cdouble to_complex(double r) {
|
||||||
|
cdouble z;
|
||||||
|
__real__ z = r;
|
||||||
|
return z;
|
||||||
|
}
|
||||||
|
cdouble elt_zero() {
|
||||||
|
cdouble a = to_complex(0.0);
|
||||||
|
a+=1.0;
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
@ -1233,6 +1233,10 @@ declare_return_variable (inline_data *id, tree return_slot_addr,
|
|||||||
var = return_slot_addr;
|
var = return_slot_addr;
|
||||||
else
|
else
|
||||||
var = build_fold_indirect_ref (return_slot_addr);
|
var = build_fold_indirect_ref (return_slot_addr);
|
||||||
|
if (TREE_CODE (TREE_TYPE (result)) == COMPLEX_TYPE
|
||||||
|
&& !DECL_COMPLEX_GIMPLE_REG_P (result)
|
||||||
|
&& DECL_P (var))
|
||||||
|
DECL_COMPLEX_GIMPLE_REG_P (var) = 0;
|
||||||
use = NULL;
|
use = NULL;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user