aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg/try-catch-4.mm
diff options
context:
space:
mode:
authorZiemowit Laski <zlaski@apple.com>2005-05-26 01:53:56 +0000
committerMike Stump <mrs@gcc.gnu.org>2005-05-26 01:53:56 +0000
commit7cb56e5cd481d9da6400cec836eb3c69b6908cf6 (patch)
tree3eb22dddf7c7416df4c11d602f1d6f9c6c6454f4 /gcc/testsuite/obj-c++.dg/try-catch-4.mm
parent047c2765978683fb89087064711d1aafa3c17f0e (diff)
downloadgcc-7cb56e5cd481d9da6400cec836eb3c69b6908cf6.zip
gcc-7cb56e5cd481d9da6400cec836eb3c69b6908cf6.tar.gz
gcc-7cb56e5cd481d9da6400cec836eb3c69b6908cf6.tar.bz2
next_mapping.h: Update for C++.
* objc/execute/next_mapping.h: Update for C++. * obj-c++.dg/selector-1.mm: Move to... * obj-c++.dg/selector-4.mm: here... * obj-c++.dg/comp-types-1.mm: New. * obj-c++.dg/cxx-class-1.mm: New. * obj-c++.dg/cxx-ivars-1.mm: New. * obj-c++.dg/cxx-ivars-2.mm: New. * obj-c++.dg/cxx-ivars-3.mm: New. * obj-c++.dg/cxx-scope-1.mm: New. * obj-c++.dg/cxx-scope-2.mm: New. * obj-c++.dg/defs.mm: New. * obj-c++.dg/empty-private-1.mm: New. * obj-c++.dg/encode-1.mm: New. * obj-c++.dg/encode-2.mm: New. * obj-c++.dg/encode-3.mm: New. * obj-c++.dg/extern-c-1.mm: New. * obj-c++.dg/extra-semi.mm: New. * obj-c++.dg/fix-and-continue-2.mm: New. * obj-c++.dg/isa-field-1.mm: New. * obj-c++.dg/ivar-list-semi.mm: New. * obj-c++.dg/local-decl-1.mm: New. * obj-c++.dg/lookup-1.mm: New. * obj-c++.dg/lookup-2.mm: New. * obj-c++.dg/method-1.mm: New. * obj-c++.dg/method-2.mm: New. * obj-c++.dg/method-3.mm: New. * obj-c++.dg/method-4.mm: New. * obj-c++.dg/method-5.mm: New. * obj-c++.dg/method-6.mm: New. * obj-c++.dg/method-7.mm: New. * obj-c++.dg/no-extra-load.mm: New. * obj-c++.dg/overload-1.mm: New. * obj-c++.dg/pragma-1.mm: New. * obj-c++.dg/pragma-2.mm: New. * obj-c++.dg/private-1.mm: New. * obj-c++.dg/private-2.mm: New. * obj-c++.dg/proto-qual-1.mm: New. * obj-c++.dg/qual-types-1.mm: New. * obj-c++.dg/stubify-1.mm: New. * obj-c++.dg/stubify-2.mm: New. * obj-c++.dg/super-class-1.mm: New. * obj-c++.dg/super-class-2.mm: New. * obj-c++.dg/super-dealloc-1.mm: New. * obj-c++.dg/super-dealloc-2.mm: New. * obj-c++.dg/template-1.mm: New. * obj-c++.dg/template-2.mm: New. * obj-c++.dg/template-3.mm: New. * obj-c++.dg/template-4.mm: New. * obj-c++.dg/template-5.mm: New. * obj-c++.dg/template-6.mm: New. * obj-c++.dg/try-catch-1.mm: New. * obj-c++.dg/try-catch-2.mm: New. * obj-c++.dg/try-catch-3.mm: New. * obj-c++.dg/try-catch-4.mm: New. * obj-c++.dg/try-catch-5.mm: New. * obj-c++.dg/try-catch-6.mm: New. * obj-c++.dg/try-catch-7.mm: New. * obj-c++.dg/try-catch-8.mm: New. * obj-c++.dg/try-catch-9.mm: New. * obj-c++.dg/va-meth-1.mm: New. Co-Authored-By: Mike Stump <mrs@apple.com> From-SVN: r100181
Diffstat (limited to 'gcc/testsuite/obj-c++.dg/try-catch-4.mm')
-rw-r--r--gcc/testsuite/obj-c++.dg/try-catch-4.mm25
1 files changed, 25 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 0000000..8dc0331
--- /dev/null
+++ b/gcc/testsuite/obj-c++.dg/try-catch-4.mm
@@ -0,0 +1,25 @@
+/* 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) {
+ }
+}