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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [tree-ssa/] [pr17517.C] - Rev 841

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

// Test PR 17517.  Test case provided by Serge Belyshev.
 
 /* { dg-do compile } */
 /* { dg-options "-O2" } */


extern void foo ();

struct Ptr {
  int * ptr;
  Ptr () { ptr = 0; }
  ~Ptr() { delete ptr; }
  Ptr &operator= (int * p) { ptr = p; return *this; }
};

int *new_checker () { foo (); return 0; }

void pipe (int c)
{
  Ptr checker;
  
  foo ();
  for (;;)
    {
    switch (c)
      {
    case '-':
      checker = new_checker ();
      break;
      }
    }
}

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

powered by: WebSVN 2.1.0

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