Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp0x/initlist122.C @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
145:1830386684a0 | 152:2b5abeee2509 |
---|---|
1 // PR c++/94041 | |
2 // { dg-do run { target c++11 } } | |
3 | |
4 bool gone; | |
5 struct Temp { ~Temp() { gone = true; } }; | |
6 struct A{ A() {}; A(const Temp&) noexcept {}; }; | |
7 struct B{ ~B() {}; }; | |
8 struct Pair{ A a; B b; }; | |
9 | |
10 void foo(const Pair&) noexcept { if (gone) __builtin_abort(); } | |
11 | |
12 int main() | |
13 { | |
14 foo({A(Temp{}), B()}); | |
15 if (!gone) __builtin_abort (); | |
16 } |