summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/binding2.C
blob: 5a7328125a0faee5f7b77f5367f54e47655cf4a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// { dg-do assemble  }
// Bug: g++ screws up binding levels in a switch statement with cleanups.

struct A {
  ~A() { }
};

int f (int i)
{
  switch (i) {
  default:
    A a;
  }
  return 1;
}				// causes compiler segfault