repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.mike
/
eh10.C
blob
32587d4c158b0b104d869928e2cfebfd150002ee
1
// { dg-do run { xfail sparc64-*-elf arm-*-pe } }
2
// { dg-options "-fexceptions" }
3
4
void foo() {
5
int i;
6
i = 42;
7
throw i;
8
}
9
10
void ee(int *);
11
12
void bar() {
13
int i = 2;
14
ee(&i);
15
}
16
17
void ee(int *) { }
18
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;
29
}