Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/cpp0x/initlist116.C @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | 1830386684a0 |
children |
line wrap: on
line source
// PR c++/66139 // { dg-do run { target c++11 } } int constructed = 0; class lock_guard_ext{ public: lock_guard_ext() { ++constructed; } ~lock_guard_ext() { --constructed; } }; struct Access { lock_guard_ext lock; int value; }; int t() { throw 0; } Access foo1() { return { {}, t() }; } int main () { try { foo1(); } catch (int) {} if (constructed != 0) __builtin_abort(); }