diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/compat/init/array5_y.C')
-rw-r--r-- | gcc/testsuite/g++.dg/compat/init/array5_y.C | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/compat/init/array5_y.C b/gcc/testsuite/g++.dg/compat/init/array5_y.C new file mode 100644 index 000000000..64b295ed5 --- /dev/null +++ b/gcc/testsuite/g++.dg/compat/init/array5_y.C @@ -0,0 +1,20 @@ +int count; +int num; + +struct A +{ + A(); + ~A(); +}; + +A::A() +{ + if (count == num) + throw ""; + count++; +} + +A::~A() +{ + count--; +} |