Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp0x/constexpr-93169.C @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | |
children |
rev | line source |
---|---|
152 | 1 // PR c++/93169 - Wrong-code with a non-constexpr constructor. |
2 // { dg-do run { target c++11 } } | |
3 // { dg-options "-O2" } | |
4 | |
5 template <typename T> class B { | |
6 struct C { | |
7 T h; | |
8 constexpr C() {} | |
9 ~C() {} | |
10 } c; | |
11 }; | |
12 struct S { | |
13 int g; | |
14 S() { g = 2; } | |
15 }; | |
16 | |
17 int | |
18 main() | |
19 { | |
20 static const B<S> f; | |
21 } |