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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [opt/] [cfg4.C] - Diff between revs 301 and 338

Only display areas with differences | Details | Blame | View Log

Rev 301 Rev 338
// PR optimization/13067
// PR optimization/13067
// Origin: 
// Origin: 
// This used to fail on the tree-ssa because of "out-of-ssa"
// This used to fail on the tree-ssa because of "out-of-ssa"
//  We might have a valid variable, but not a valid value when trying to find
//  We might have a valid variable, but not a valid value when trying to find
//  useless statements created by out-of-ssa translation. In this case
//  useless statements created by out-of-ssa translation. In this case
//  val will be set to null, then later dereferenced.  Bad.
//  val will be set to null, then later dereferenced.  Bad.
// { dg-do compile }
// { dg-do compile }
// { dg-options "-Os" }
// { dg-options "-Os" }
struct Iterator
struct Iterator
{
{
  Iterator operator++();
  Iterator operator++();
};
};
void GetChar(char* aChar);
void GetChar(char* aChar);
void foo(char aChar)
void foo(char aChar)
{
{
  char quote;
  char quote;
  Iterator end;
  Iterator end;
  while (1) {
  while (1) {
    if (aChar == '"')
    if (aChar == '"')
      GetChar(&aChar);
      GetChar(&aChar);
    switch (aChar) {
    switch (aChar) {
    case 'a':
    case 'a':
      ++end;
      ++end;
      if (quote) {
      if (quote) {
        if (quote == aChar) {
        if (quote == aChar) {
          quote = 0;
          quote = 0;
        }
        }
      } else {
      } else {
        quote = aChar;
        quote = aChar;
      }
      }
    }
    }
  }
  }
}
}
 
 

powered by: WebSVN 2.1.0

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