PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / pr51879-17.c
blob9ecb9374fecdb4422ad91c8e695c19f3847b9538
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ftree-tail-merge -fdump-tree-pre" } */
4 struct S {
5 int i;
6 };
8 extern struct S foo (void);
9 extern int foo2 (void);
11 struct S s, s2;
13 int bar (int c) {
14 int r;
16 if (c)
18 s = foo ();
19 r = foo2 ();
21 else
23 s2 = foo ();
24 r = foo2 ();
27 return r;
30 /* { dg-final { scan-tree-dump-times "foo \\(" 2 "pre"} } */
31 /* { dg-final { scan-tree-dump-times "foo2 \\(" 2 "pre"} } */