PR testsuite/52641
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-pre-29.c
blobf2d2c4107ce48477092101dc2c25f72420136157
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-pre-details" } */
4 int flag, hoist, y, z;
6 void
7 foo (void)
9 if (flag)
10 y = hoist + 4;
11 else
12 flag = 888;
13 z = hoist + 4;
14 bark ();
17 /* We should see the partial redundancy of hoist + 4, not being confused
18 about bark () possibly clobbering hoist. */
20 /* { dg-final { scan-tree-dump "Replaced hoist" "pre" } } */
21 /* { dg-final { cleanup-tree-dump "pre" } } */