OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [cfg4.C] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR optimization/13067
2
// Origin: 
3
 
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.
8
 
9
// { dg-do compile }
10
// { dg-options "-Os" }
11
 
12
 
13
 
14
struct Iterator
15
{
16
  Iterator operator++();
17
};
18
 
19
void GetChar(char* aChar);
20
 
21
void foo(char aChar)
22
{
23
  char quote;
24
  Iterator end;
25
 
26
  while (1) {
27
    if (aChar == '"')
28
      GetChar(&aChar);
29
 
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
  }
42
}
43
 
44
 
45
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.