http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00110.html
[official-gcc.git] / gcc / testsuite / g++.dg / opt / pr19768.C
blob376ca99384213ee1c566e2ecafdd4f441c44d268
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
7 // { dg-do compile }
8 // { dg-options "-O" }
10 struct LeveLogger
12   int currentLevel;
14 extern LeveLogger LL;
15 struct gg
17   ~gg ( void )
18     { LL.currentLevel = 1; }
20 void f(void);
21 void g ( void )
23   gg sll;
24   {
25     gg sll;
26     f();
27   }
28   f();