1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ftree-tail-merge -fdump-tree-pre -fno-code-hoisting" } */
3
4 __attribute__((pure)) int bar (int);
5 __attribute__((pure)) int bar2 (int);
6 void baz (int);
7
8 int x, z;
9
10 void
11 foo (int y)
12 {
13 int a = 0;
14 if (y == 6)
15 {
16 a += bar (7);
17 a += bar2 (6);
18 }
19 else
20 {
21 a += bar2 (6);
22 a += bar (7);
23 }
24 baz (a);
25 }
26
27 /* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre" { xfail *-*-* } } } */
28 /* { dg-final { scan-tree-dump-times "bar2 \\(" 1 "pre" { xfail *-*-* } } } */