| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fno-early-inlining -fno-tree-vrp -fno-tree-dominator-opts -fdump-tree-thread2-details-blocks" } */ |
| 3 |
|
| 4 |
static int a; |
| 5 |
static int b; |
| 6 |
void test2 (); |
| 7 |
void |
| 8 |
test () |
| 9 |
{ |
| 10 |
b = 7; |
| 11 |
} |
| 12 |
|
| 13 |
void |
| 14 |
main (int argc) |
| 15 |
{ |
| 16 |
if (argc) |
| 17 |
{ |
| 18 |
a = 7; |
| 19 |
test (); |
| 20 |
} |
| 21 |
else |
| 22 |
a = 0; |
| 23 |
if (a) |
| 24 |
test2 (); |
| 25 |
if (b) |
| 26 |
test2 (); |
| 27 |
} |
| 28 |
/* { dg-final { scan-tree-dump-times "Registering jump thread" 2 "thread2" } } */ |
| 29 |
/* { dg-final { scan-tree-dump-not "Invalid sum" "thread2" } } */ |