diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/array1.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/array1.C | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/array1.C b/gcc/testsuite/g++.old-deja/g++.other/array1.C new file mode 100644 index 000000000..5aa5b1ed6 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/array1.C @@ -0,0 +1,27 @@ +// { dg-do run } +int i; + +struct S { + S (int) { + ++i; + if (i == 3) + throw 3; + } + + S () {} + + ~S() { + --i; + } +}; + +int main() +{ + try { + S s[5] = { 0, 1, 2, 3, 4 }; + } catch (...) { + } + + if (i != 1) + return 1; +} |