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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [eh/] [dtor2.C] - Blame information for rev 825

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

Line No. Rev Author Line
1 149 jeremybenn
// PR c++/12751
2
// tree-ssa eh lowering bug ran a destructor twice for one object
3
// { dg-do run }
4
 
5
static int check;
6
 
7
struct Y {
8
  Y();
9
  ~Y();
10
};
11
 
12
void foo() {
13
  Y y1;
14
  Y y2;
15
  switch(0) {
16
    case 1: {
17
        Y y3;
18
        return;
19
      }
20
  }
21
}
22
 
23
Y::Y() { ++check; }
24
Y::~Y() { --check; }
25
 
26
int main()
27
{
28
  foo ();
29
  return check;
30
}

powered by: WebSVN 2.1.0

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