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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [tree-ssa/] [pr17517.C] - Rev 478

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.