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
Merge from trunk
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
tree-prof
/
pr59255.C
blob
eb2b51f7e2525012529525f8d3c1d6c19df8dbf1
1
// PR c++/59255
2
// { dg-options "-O2 -std=c++11" }
3
4
struct S
5
{
6
__attribute__((noinline, noclone)) ~S () noexcept (true)
7
{
8
if (fn)
9
fn (1);
10
}
11
void (*fn) (int);
12
};
13
14
__attribute__((noinline, noclone)) void
15
foo (int x)
16
{
17
if (x != 1)
18
throw 1;
19
}
20
21
int
22
main ()
23
{
24
for (int i = 0; i < 100; i++)
25
{
26
S s;
27
s.fn = foo;
28
}
29
}