Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / g++.dg / opt / cfg4.C
blob94522ed4171f6623bae496c5d88a028005b6f9be
1 // PR optimization/13067
2 // Origin: <bryner@brianryner.com>
4 // This used to fail on the tree-ssa because of "out-of-ssa"
5 //  We might have a valid variable, but not a valid value when trying to find
6 //  useless statements created by out-of-ssa translation. In this case
7 //  val will be set to null, then later dereferenced.  Bad.
9 // { dg-do compile }
10 // { dg-options "-Os" }
14 struct Iterator
16   Iterator operator++();
19 void GetChar(char* aChar);
21 void foo(char aChar)
23   char quote;
24   Iterator end;
26   while (1) {
27     if (aChar == '"')
28       GetChar(&aChar);
30     switch (aChar) {
31     case 'a':
32       ++end;
33       if (quote) {
34         if (quote == aChar) {
35           quote = 0;
36         }
37       } else {
38         quote = aChar;
39       }
40     }
41   }