aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-06-16 10:15:35 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-06-16 10:15:35 +0000
commitf33e32a8ccd4963e4f5b0616f6f08502c2a7df72 (patch)
treeadc23bf6c9b959ce6ce06b4649c61cb83d76b9c3 /gcc/testsuite/g++.old-deja
parent8c225122ffcee090ea1afa0b333afbf09241e19c (diff)
downloadgcc-f33e32a8ccd4963e4f5b0616f6f08502c2a7df72.zip
gcc-f33e32a8ccd4963e4f5b0616f6f08502c2a7df72.tar.gz
gcc-f33e32a8ccd4963e4f5b0616f6f08502c2a7df72.tar.bz2
init.c (expand_cleanup_for_base): New function, split out from ...
* init.c (expand_cleanup_for_base): New function, split out from ... (emit_base_init): Here. (expand_aggr_vbase_init): Use it. From-SVN: r27543
Diffstat (limited to 'gcc/testsuite/g++.old-deja')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.eh/vbase1.C24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/vbase1.C b/gcc/testsuite/g++.old-deja/g++.eh/vbase1.C
new file mode 100644
index 0000000..cf665d4
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.eh/vbase1.C
@@ -0,0 +1,24 @@
+// Origin: Mark Mitchell <mark@codesourcery.com>
+
+int i;
+int j;
+
+struct B
+{
+ B() { i = 1; }
+ ~B() { j = 7; }
+};
+
+struct D : virtual public B {
+ D () { throw 3; }
+};
+
+int main ()
+{
+ try {
+ D d;
+ } catch (int) {
+ if (i != 1 || j != 7)
+ return 1;
+ }
+}