Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/tree-prof/pr59255.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // PR c++/59255 |
2 // { dg-options "-std=c++11 -O2" } | |
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 } |