| 1 |
// PR tree-opt/19768 |
| 2 |
// tree DSE was removing one store to LL.currentLevel |
| 3 |
// but forgot that since the vop was in an abnormal PHI |
| 4 |
// that we have to update the SSA_NAME which we propagate |
| 5 |
// into the abnormal PHI |
| 6 |
|
| 7 |
// { dg-do compile } |
| 8 |
// { dg-options "-O" } |
| 9 |
|
| 10 |
struct LeveLogger |
| 11 |
{ |
| 12 |
int currentLevel; |
| 13 |
}; |
| 14 |
extern LeveLogger LL; |
| 15 |
struct gg |
| 16 |
{ |
| 17 |
~gg ( void ) |
| 18 |
{ LL.currentLevel = 1; } |
| 19 |
}; |
| 20 |
void f(void); |
| 21 |
void g ( void ) |
| 22 |
{ |
| 23 |
gg sll; |
| 24 |
{ |
| 25 |
gg sll; |
| 26 |
f(); |
| 27 |
} |
| 28 |
f(); |
| 29 |
} |