From aeb5ba1edb6e356821f4d8e2810cb2fbbf3075d6 Mon Sep 17 00:00:00 2001 From: iains Date: Thu, 7 Oct 2010 14:40:33 +0000 Subject: [PATCH] gcc/testsuite: * objc.dg/foreach-1.m: Adjust for -fnext-runtime compatibility. * objc.dg/foreach-2.m: Likewise. * objc.dg/foreach-3.m: Likewise. * objc.dg/foreach-4.m: Likewise. * objc.dg/foreach-5.m: Likewise. * objc.dg/foreach-6.m: Likewise. * objc.dg/foreach-7.m: Likewise. * objc.dg/objc-foreach-4.m: Likewise. * objc.dg/objc-foreach-5.m: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165117 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 14 +++++++++++++- gcc/testsuite/objc.dg/foreach-1.m | 8 ++++---- gcc/testsuite/objc.dg/foreach-2.m | 14 +++++++++----- gcc/testsuite/objc.dg/foreach-3.m | 15 +++++++++------ gcc/testsuite/objc.dg/foreach-4.m | 14 +++++++++----- gcc/testsuite/objc.dg/foreach-5.m | 13 ++++++++----- gcc/testsuite/objc.dg/foreach-6.m | 8 +++----- gcc/testsuite/objc.dg/foreach-7.m | 8 +++----- gcc/testsuite/objc.dg/objc-foreach-4.m | 4 +++- gcc/testsuite/objc.dg/objc-foreach-5.m | 4 +++- 10 files changed, 64 insertions(+), 38 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 515582ed7fe..2f1f7616b1a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,8 +1,20 @@ +2010-10-07 Iain Sandoe + + * objc.dg/foreach-1.m: Adjust for -fnext-runtime compatibility. + * objc.dg/foreach-2.m: Likewise. + * objc.dg/foreach-3.m: Likewise. + * objc.dg/foreach-4.m: Likewise. + * objc.dg/foreach-5.m: Likewise. + * objc.dg/foreach-6.m: Likewise. + * objc.dg/foreach-7.m: Likewise. + * objc.dg/objc-foreach-4.m: Likewise. + * objc.dg/objc-foreach-5.m: Likewise. + 2010-10-07 Richard Guenther PR middle-end/45869 * gcc.dg/torture/pr45869.c: New testcase. - + 2010-10-07 Iain Sandoe * objc.dg/set-not-used-1.m: New diff --git a/gcc/testsuite/objc.dg/foreach-1.m b/gcc/testsuite/objc.dg/foreach-1.m index 541b5835c35..dd1d8cf985d 100644 --- a/gcc/testsuite/objc.dg/foreach-1.m +++ b/gcc/testsuite/objc.dg/foreach-1.m @@ -1,12 +1,12 @@ /* Test basic Objective-C foreach syntax. This tests iterations that do nothing. */ -/* FIXME: Run this test with the NeXT runtime as well. */ -/* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */ /* { dg-do run } */ +/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ +/* { dg-additional-sources "../objc-obj-c++-shared/Object1.m" } */ + +#import "../objc-obj-c++-shared/Object1.h" -#include -#include extern void abort (void); /* struct __objcFastEnumerationState diff --git a/gcc/testsuite/objc.dg/foreach-2.m b/gcc/testsuite/objc.dg/foreach-2.m index e1585021813..1e9c515f600 100644 --- a/gcc/testsuite/objc.dg/foreach-2.m +++ b/gcc/testsuite/objc.dg/foreach-2.m @@ -1,15 +1,19 @@ /* Test basic Objective-C foreach syntax. This tests iterations, with the basic syntax 'for (object in array) statements' */ -/* FIXME: Run this test with the NeXT runtime as well. */ -/* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */ /* { dg-do run } */ +/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ +/* { dg-additional-sources "../objc-obj-c++-shared/Object1.m" } */ -#include -#include +#import "../objc-obj-c++-shared/Object1.h" +#import "../objc-obj-c++-shared/next-mapping.h" +#ifndef __NEXT_RUNTIME__ #include +#endif + +extern int printf (const char *, ...); #include -extern void abort (void); + /* struct __objcFastEnumerationState { diff --git a/gcc/testsuite/objc.dg/foreach-3.m b/gcc/testsuite/objc.dg/foreach-3.m index 893631fd423..da23f83799b 100644 --- a/gcc/testsuite/objc.dg/foreach-3.m +++ b/gcc/testsuite/objc.dg/foreach-3.m @@ -1,18 +1,21 @@ /* Test basic Objective-C foreach syntax. This tests the mutation. */ -/* FIXME: Run this test with the NeXT runtime as well. */ -/* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */ +/* { dg-do compile } */ + /* FIXME: This test should be run, and it succeeds if the program aborts at the right time (when the mutation happens). It currently works, but how do we tell the testsuite to test for it ? */ -/* { dg-do compile } */ -#include -#include +#import "../objc-obj-c++-shared/Object1.h" +#import "../objc-obj-c++-shared/next-mapping.h" +#ifndef __NEXT_RUNTIME__ #include +#endif + +extern int printf (const char *, ...); #include -extern void abort (void); + /* struct __objcFastEnumerationState { diff --git a/gcc/testsuite/objc.dg/foreach-4.m b/gcc/testsuite/objc.dg/foreach-4.m index c9cd977b095..b6cfe2c0c65 100644 --- a/gcc/testsuite/objc.dg/foreach-4.m +++ b/gcc/testsuite/objc.dg/foreach-4.m @@ -1,15 +1,19 @@ /* Test basic Objective-C foreach syntax. This tests iterations, with the declaration syntax 'for (id object in array) statements' */ -/* FIXME: Run this test with the NeXT runtime as well. */ -/* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */ /* { dg-do run } */ +/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ +/* { dg-additional-sources "../objc-obj-c++-shared/Object1.m" } */ -#include -#include +#import "../objc-obj-c++-shared/Object1.h" +#import "../objc-obj-c++-shared/next-mapping.h" +#ifndef __NEXT_RUNTIME__ #include +#endif + +extern int printf (const char *, ...); #include -extern void abort (void); + /* struct __objcFastEnumerationState { diff --git a/gcc/testsuite/objc.dg/foreach-5.m b/gcc/testsuite/objc.dg/foreach-5.m index b3579970ea0..f6d34f41399 100644 --- a/gcc/testsuite/objc.dg/foreach-5.m +++ b/gcc/testsuite/objc.dg/foreach-5.m @@ -1,15 +1,18 @@ /* Test basic Objective-C foreach syntax. This tests that if you define your own NSFastEnumeration struct, the compiler picks it up. */ -/* FIXME: Run this test with the NeXT runtime as well. */ -/* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */ /* { dg-do run } */ +/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ +/* { dg-additional-sources "../objc-obj-c++-shared/Object1.m" } */ -#include -#include +#import "../objc-obj-c++-shared/Object1.h" +#import "../objc-obj-c++-shared/next-mapping.h" +#ifndef __NEXT_RUNTIME__ #include +#endif + +extern int printf (const char *, ...); #include -extern void abort (void); typedef struct { diff --git a/gcc/testsuite/objc.dg/foreach-6.m b/gcc/testsuite/objc.dg/foreach-6.m index 7a6b9609d8a..d368390cbca 100644 --- a/gcc/testsuite/objc.dg/foreach-6.m +++ b/gcc/testsuite/objc.dg/foreach-6.m @@ -1,11 +1,9 @@ /* Test basic Objective-C foreach syntax. This tests warnings and errors. */ -/* FIXME: Run this test with the NeXT runtime as well. */ -/* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */ /* { dg-do compile } */ -#include -#include -extern void abort (void); +#import "../objc-obj-c++-shared/Object1.h" +#import "../objc-obj-c++-shared/next-mapping.h" + /* struct __objcFastEnumerationState { diff --git a/gcc/testsuite/objc.dg/foreach-7.m b/gcc/testsuite/objc.dg/foreach-7.m index 42bca82e3b9..5da940f620e 100644 --- a/gcc/testsuite/objc.dg/foreach-7.m +++ b/gcc/testsuite/objc.dg/foreach-7.m @@ -1,11 +1,9 @@ /* Test basic Objective-C foreach syntax. This tests warnings and errors. */ -/* FIXME: Run this test with the NeXT runtime as well. */ -/* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */ /* { dg-do compile } */ -#include -#include -extern void abort (void); +#import "../objc-obj-c++-shared/Object1.h" +#import "../objc-obj-c++-shared/next-mapping.h" + /* struct __objcFastEnumerationState { diff --git a/gcc/testsuite/objc.dg/objc-foreach-4.m b/gcc/testsuite/objc.dg/objc-foreach-4.m index 76e429e6941..1a6c101f069 100644 --- a/gcc/testsuite/objc.dg/objc-foreach-4.m +++ b/gcc/testsuite/objc.dg/objc-foreach-4.m @@ -1,7 +1,9 @@ /* Test for valid objc objects used in a for-each statement. */ /* FIXME: Run this test with the GNU runtime as well. */ -/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ /* { dg-do compile { target *-*-darwin* } } */ +/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + +#include #include // gcc -o foo foo.m -framework Foundation diff --git a/gcc/testsuite/objc.dg/objc-foreach-5.m b/gcc/testsuite/objc.dg/objc-foreach-5.m index 95a950375a4..26c2dfce8e7 100644 --- a/gcc/testsuite/objc.dg/objc-foreach-5.m +++ b/gcc/testsuite/objc.dg/objc-foreach-5.m @@ -1,6 +1,8 @@ /* FIXME: Run this test with the GNU runtime as well. */ -/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ /* { dg-do compile { target *-*-darwin* } } */ +/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + +#include #import NSArray * createTestVictim(unsigned capacity) { -- 2.11.4.GIT