summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/nrv1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/nrv1.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/nrv1.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/nrv1.c b/gcc/testsuite/gcc.target/i386/nrv1.c
new file mode 100644
index 000000000..5cd8b066d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/nrv1.c
@@ -0,0 +1,12 @@
+/* Verify that gimple-level NRV is occurring even for SSA_NAMEs. *./
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-optimized" } */
+/* { dg-require-effective-target ilp32 } */
+
+_Complex double foo (_Complex double x)
+{
+ return __builtin_cexp (x);
+}
+
+/* { dg-final { scan-tree-dump-times "return slot optimization" 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */