blob: 8c156affa209e16b98e6e35e51391fd41d665103 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-pre-details" } */
void bark (void);
int flag, hoist, y, z;
void
foo (void)
{
if (flag)
y = hoist + 4;
else
flag = 888;
z = hoist + 4;
bark ();
}
/* We should see the partial redundancy of hoist + 4, not being confused
about bark () possibly clobbering hoist. */
/* { dg-final { scan-tree-dump "Replaced hoist" "pre" } } */
|