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
+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>
* builtins.c (expand_builtin_sincos): New function.
+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>
* gcc.target/i386/387-9.c: New testcase.
--- /dev/null
+// 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;
+}
+
var = return_slot_addr;
else
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;
goto done;
}