1 /* { dg-do compile { target { { { { { { i?86-*-* x86_64-*-* } && x32 } || lp64 } && { ! s390*-*-* } } && { ! hppa*64*-*-* } } && { ! alpha*-*-* } } } } */
2 /* { dg-options "-O2 -fdump-rtl-dse1 -fdump-rtl-final" } */
3
4 /* Restrict to 64-bit targets since 32-bit targets usually return small
5 structures in memory. */
6
7 struct ints { int a, b, c; } foo();
8 void bar(int a, int b);
9
func()10 void func() {
11 struct ints s = foo();
12 bar(s.a, s.b);
13 }
14
15 /* { dg-final { scan-rtl-dump "global deletions = (2|3)" "dse1" } } */
16 /* { dg-final { cleanup-rtl-dump "dse1" } } */
17
18 /* { dg-final { scan-rtl-dump-not "insn \[^\n\]*set \\(mem" "final" } } */
19 /* { dg-final { cleanup-rtl-dump "final" } } */
20