aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/except1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.law/except1.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/except1.C29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.law/except1.C b/gcc/testsuite/g++.old-deja/g++.law/except1.C
new file mode 100644
index 00000000000..edfb85f7ce9
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.law/except1.C
@@ -0,0 +1,29 @@
+// Build don't link:
+// Special g++ Options: -fexceptions
+// GROUPS passed exceptions
+// except file
+// Message-Id: <9207221230.AA08566@life.ai.mit.edu>
+// From: EWALLACE@endvmtkl.vnet.ibm.com
+// Subject: Bugs
+// Date: Wed, 22 Jul 92 08:29:30 EDT
+
+extern "C" void puts(const char *);
+
+class foo {
+public:
+ class error {};
+
+ void cause_error(void) { throw error(); }
+};
+
+int main(void)
+{
+ foo f;
+ try {
+ f.cause_error();
+ }
+ catch (foo::error) {
+ puts("Caught it.");
+ }
+ return 0;
+}