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
strub: enable conditional support
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
torture
/
pr100382.C
blob
eac5743b956d59484075cd5014358e5be9758433
1
// { dg-do run }
2
// { dg-additional-options -fno-delete-dead-exceptions }
3
4
int x, y;
5
int __attribute__((pure,noinline)) foo () { if (x) throw 1; return y; }
6
7
int __attribute__((noinline)) bar()
8
{
9
int a[2];
10
x = 1;
11
try {
12
int res = foo ();
13
a[0] = res;
14
} catch (...) {
15
return 0;
16
}
17
return 1;
18
}
19
20
int main()
21
{
22
if (bar ())
23
__builtin_abort ();
24
return 0;
25
}