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] - Blame information for rev 853

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

Line No. Rev Author Line
1 149 jeremybenn
// Test PR 17517.  Test case provided by Serge Belyshev.
2
 
3
 /* { dg-do compile } */
4
 /* { dg-options "-O2" } */
5
 
6
 
7
extern void foo ();
8
 
9
struct Ptr {
10
  int * ptr;
11
  Ptr () { ptr = 0; }
12
  ~Ptr() { delete ptr; }
13
  Ptr &operator= (int * p) { ptr = p; return *this; }
14
};
15
 
16
int *new_checker () { foo (); return 0; }
17
 
18
void pipe (int c)
19
{
20
  Ptr checker;
21
 
22
  foo ();
23
  for (;;)
24
    {
25
    switch (c)
26
      {
27
    case '-':
28
      checker = new_checker ();
29
      break;
30
      }
31
    }
32
}

powered by: WebSVN 2.1.0

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