aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/eh4.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/eh4.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/eh4.C12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/eh4.C b/gcc/testsuite/g++.old-deja/g++.other/eh4.C
new file mode 100644
index 00000000000..e88a4337db4
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/eh4.C
@@ -0,0 +1,12 @@
+// Origin: Jean-Marc Bourguet <bourguet@cadence.com>
+// Build don't link:
+
+class foo {
+public:
+ foo() {};
+ void throwMe () {
+ throw *this; // ERROR - cannot be used in throw-expression
+ };
+ virtual void test () = 0;
+};
+