summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/eh19.C
blob: bbd668f9833bfb55bed648d9e826977cff9b8ff9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// { dg-do assemble  }
// { dg-options "-fexceptions" }

class test1 {
public:
  class fehler{public:fehler(){};};
  void func(int a) {
    if( a == 0 )
      throw fehler();
  }
};

int main() {
  test1 var;

  try {
    var.func(1);
    var.func(0);
  } catch(test1::fehler())		// function type promoted to pointer
    {
      ;
    }
}