Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.mike / eh10.C
blob32587d4c158b0b104d869928e2cfebfd150002ee
1 // { dg-do run { xfail sparc64-*-elf arm-*-pe } }
2 // { dg-options "-fexceptions" }
4 void foo() {
5   int i;
6   i = 42;
7   throw i;
10 void ee(int *);
12 void bar() {
13   int i = 2;
14   ee(&i);
17 void ee(int *) { }
19 int
20 main() {
21   try {
22     foo();
23     return 3;
24   } catch (int& i) {
25     bar();
26     return i != 42;
27   }
28   return 2;