summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr26421.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/pr26421.c')
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr26421.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr26421.c b/gcc/testsuite/gcc.dg/tree-ssa/pr26421.c
new file mode 100644
index 000000000..70f123158
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr26421.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+typedef struct {
+ int i;
+ int j;
+ int k;
+} Foo;
+
+void bar(Foo*);
+int foo(void)
+{
+ Foo a;
+ a.i = 1;
+ bar(&a);
+ return a.i;
+}
+
+/* Verify the call clobbers all of a. */
+
+/* { dg-final { scan-tree-dump-not "return 1;" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */