summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/debug6.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/debug6.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/debug6.C24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/debug6.C b/gcc/testsuite/g++.old-deja/g++.other/debug6.C
new file mode 100644
index 000000000..a4d088413
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/debug6.C
@@ -0,0 +1,24 @@
+// { dg-do assemble }
+// { dg-options "-g -O2" }
+
+// Copyright (C) 1999 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 21 Nov 1999 <nathan@acm.org>
+
+// This causes assember relocation errors
+
+struct X
+{
+ virtual ~X () {}
+};
+
+struct Y
+{
+ Y (){};
+};
+
+void foo ()
+{
+ X *x = new X;
+ x->~X ();
+ Y ys[2];
+}