2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr44194-1.c
blob20b74a5aa122e0ad57ed714812d9e91c71484260
1 /* { dg-do compile { target { { { { { { { { { { i?86-*-* x86_64-*-* } && x32 } || lp64 } && { ! s390*-*-* } } && { ! hppa*64*-*-* } } && { ! alpha*-*-* } } && { { ! powerpc*-*-linux* } || powerpc_elfv2 } } && { ! nvptx-*-* } } } } } } */
2 /* { dg-options "-O2 -fdump-rtl-dse1 -fdump-rtl-final" } */
4 /* Restrict to 64-bit targets since 32-bit targets usually return small
5 structures in memory. */
7 struct ints { int a, b, c; } foo();
8 void bar(int a, int b);
10 void func() {
11 struct ints s = foo();
12 bar(s.a, s.b);
15 /* { dg-final { scan-rtl-dump "global deletions = (2|3)" "dse1" } } */
17 /* Here we want to ignore frame-related instructions, marked as insn/f,
18 that do things like store the link register to the stack. We also want
19 to treat insns the same regardless of whether they have a scheduling
20 :TI marker, so match both "insn " and "insn:". */
21 /* { dg-final { scan-rtl-dump-not "insn\[: \]\[^\n\]*set \\(mem(?!\[^\n\]*scratch)" "final" } } */