[AArch64/arm] PR testsuite/85326 Avoid C++ tests when C++ compiler not present
[official-gcc.git] / gcc / testsuite / g++.dg / init / cleanup4.C
blobb9769e3bbeb6acb36c8cc25b753ef1984df06381
1 // PR c++/79679
2 // { dg-do run }
4 int count;
5 struct S {
6     S() { ++count; }
7     S(const S&) { ++count; }
8     ~S() { --count; }
9 };
11 struct T {
12     T(S) {}
15 int main() {
16   {
17     S s;
18     T u(s);
19   }
20   if (count)
21     __builtin_abort();