From 6aca96ad04cfec3416b0624c30ed49e515dfd45b Mon Sep 17 00:00:00 2001 From: pinskia Date: Sun, 14 Aug 2005 00:58:26 +0000 Subject: [PATCH] * objc/execute/exceptions/exceptions.exp: New exp for the exceptions testsuite. * objc/execute/exceptions/trivial.m: New test. * objc.dg/try-catch-11.m: Move to ... * objc/execute/exceptions/foward-1.m: Here. * objc.dg/try-catch-2.m: Move to ... * objc/execute/exceptions/catchall-1.m: Here. * objc.dg/try-catch-8.m: Move to ... * objc/execute/exceptions/local-variables-1.m: Here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103071 138bc75d-0d04-0410-961f-82ee72b054a4 --- .../execute/exceptions/catchall-1.m} | 3 -- .../objc/execute/exceptions/exceptions.exp | 42 ++++++++++++++++++++++ .../execute/exceptions/foward-1.m} | 5 +-- .../execute/exceptions/local-variables-1.m} | 3 -- gcc/testsuite/objc/execute/exceptions/trivial.m | 7 ++++ 5 files changed, 50 insertions(+), 10 deletions(-) rename gcc/testsuite/{objc.dg/try-catch-2.m => objc/execute/exceptions/catchall-1.m} (96%) create mode 100644 gcc/testsuite/objc/execute/exceptions/exceptions.exp rename gcc/testsuite/{objc.dg/try-catch-11.m => objc/execute/exceptions/foward-1.m} (89%) rename gcc/testsuite/{objc.dg/try-catch-8.m => objc/execute/exceptions/local-variables-1.m} (95%) create mode 100644 gcc/testsuite/objc/execute/exceptions/trivial.m diff --git a/gcc/testsuite/objc.dg/try-catch-2.m b/gcc/testsuite/objc/execute/exceptions/catchall-1.m similarity index 96% rename from gcc/testsuite/objc.dg/try-catch-2.m rename to gcc/testsuite/objc/execute/exceptions/catchall-1.m index 35d60e96c00..ac7d127a1a1 100644 --- a/gcc/testsuite/objc.dg/try-catch-2.m +++ b/gcc/testsuite/objc/execute/exceptions/catchall-1.m @@ -2,9 +2,6 @@ exceptions. */ /* Developed by Ziemowit Laski . */ -/* { dg-options "-fobjc-exceptions" } */ -/* { dg-do run } */ - #include #include diff --git a/gcc/testsuite/objc/execute/exceptions/exceptions.exp b/gcc/testsuite/objc/execute/exceptions/exceptions.exp new file mode 100644 index 00000000000..6c216602499 --- /dev/null +++ b/gcc/testsuite/objc/execute/exceptions/exceptions.exp @@ -0,0 +1,42 @@ +# Copyright (C) 1991, 1992, 1993, 1995, 1997 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# This file was written by Rob Savoye. (rob@cygnus.com) +# Modified by Ovidiu Predescu (ovidiu@aracnet.com) + + +if $tracelevel then { + strace $tracelevel +} + +set additional_flags "" +lappend additional_flags "-fobjc-exceptions" + +# load support procs +load_lib objc-torture.exp + +# +# main test loop +# + +foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.m]] { + # If we're only testing specific files and this isn't one of them, skip it. + if ![runtest_file_p $runtests $src] then { + continue + } + + objc-torture-execute $src $additional_flags +} diff --git a/gcc/testsuite/objc.dg/try-catch-11.m b/gcc/testsuite/objc/execute/exceptions/foward-1.m similarity index 89% rename from gcc/testsuite/objc.dg/try-catch-11.m rename to gcc/testsuite/objc/execute/exceptions/foward-1.m index 745deca7c1d..67fbfcbb9e7 100644 --- a/gcc/testsuite/objc.dg/try-catch-11.m +++ b/gcc/testsuite/objc/execute/exceptions/foward-1.m @@ -1,9 +1,6 @@ /* Check that throwing an exception from a -forward:: works. */ /* Developed by Marcin Koziej . */ -/* { dg-do run } */ -/* { dg-options "-fobjc-exceptions -w" } */ - #import #import #include @@ -39,4 +36,4 @@ main() abort (); return 0; -} \ No newline at end of file +} diff --git a/gcc/testsuite/objc.dg/try-catch-8.m b/gcc/testsuite/objc/execute/exceptions/local-variables-1.m similarity index 95% rename from gcc/testsuite/objc.dg/try-catch-8.m rename to gcc/testsuite/objc/execute/exceptions/local-variables-1.m index 384faa38114..79a62978642 100644 --- a/gcc/testsuite/objc.dg/try-catch-8.m +++ b/gcc/testsuite/objc/execute/exceptions/local-variables-1.m @@ -2,9 +2,6 @@ block survive until the @catch block is reached. */ /* Developed by Ziemowit Laski . */ -/* { dg-options "-fobjc-exceptions -O2" } */ -/* { dg-do run } */ - #include #include #include diff --git a/gcc/testsuite/objc/execute/exceptions/trivial.m b/gcc/testsuite/objc/execute/exceptions/trivial.m new file mode 100644 index 00000000000..f1dce2c1e2b --- /dev/null +++ b/gcc/testsuite/objc/execute/exceptions/trivial.m @@ -0,0 +1,7 @@ +#import + +int main(void) +{ + [Object class]; + return 0; +} -- 2.11.0