aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg/try-catch-4.mm
diff options
context:
space:
mode:
authorno-author <no-author@gcc.gnu.org>2005-03-15 02:40:51 +0000
committerno-author <no-author@gcc.gnu.org>2005-03-15 02:40:51 +0000
commit17edb3cbcc1e5b389d68dbb213ee466ec64f89ac (patch)
tree4cab2f7840b41de6093f814431674be9e12c2447 /gcc/testsuite/obj-c++.dg/try-catch-4.mm
parent9e88bc8754ac91301313180a1f11bbf74ed1a9dc (diff)
This commit was manufactured by cvs2svn to create tagapple/gcc-5001
'apple-gcc-5001'. git-svn-id: https://gcc.gnu.org/svn/gcc/tags/apple-gcc-5001@96466 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/obj-c++.dg/try-catch-4.mm')
-rw-r--r--gcc/testsuite/obj-c++.dg/try-catch-4.mm27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/obj-c++.dg/try-catch-4.mm b/gcc/testsuite/obj-c++.dg/try-catch-4.mm
new file mode 100644
index 00000000000..7613c16fc70
--- /dev/null
+++ b/gcc/testsuite/obj-c++.dg/try-catch-4.mm
@@ -0,0 +1,27 @@
+/* APPLE LOCAL file Objective-C++ */
+/* Check that the compiler does not incorrectly complain about
+ exceptions being caught by previous @catch blocks. */
+/* Author: Ziemowit Laski <zlaski@apple.com> */
+
+/* { dg-do compile } */
+/* { dg-options "-Wall -fobjc-exceptions" } */
+
+@interface Exception
+@end
+
+@interface FooException : Exception
+@end
+
+extern void foo();
+
+void test()
+{
+ @try {
+ foo();
+ }
+ @catch (FooException* fe) {
+ }
+ @catch (Exception* e) {
+ }
+}
+