]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
foreach-1.m: Adjust for -fnext-runtime compatibility.
authorIain Sandoe <iains@gcc.gnu.org>
Thu, 7 Oct 2010 14:40:33 +0000 (14:40 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Thu, 7 Oct 2010 14:40:33 +0000 (14:40 +0000)
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.

From-SVN: r165117

gcc/testsuite/ChangeLog
gcc/testsuite/objc.dg/foreach-1.m
gcc/testsuite/objc.dg/foreach-2.m
gcc/testsuite/objc.dg/foreach-3.m
gcc/testsuite/objc.dg/foreach-4.m
gcc/testsuite/objc.dg/foreach-5.m
gcc/testsuite/objc.dg/foreach-6.m
gcc/testsuite/objc.dg/foreach-7.m
gcc/testsuite/objc.dg/objc-foreach-4.m
gcc/testsuite/objc.dg/objc-foreach-5.m

index 515582ed7fe2a27abdccb0a795fe1e0227832d7e..2f1f7616b1a31ff6101f6439b6d30ff577bda3e4 100644 (file)
@@ -1,8 +1,20 @@
+2010-10-07  Iain Sandoe  <iains@gcc.gnu.org>
+
+       * 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  <rguenther@suse.de>
 
        PR middle-end/45869
        * gcc.dg/torture/pr45869.c: New testcase.
-
+       
 2010-10-07  Iain Sandoe  <iains@gcc.gnu.org>
 
        * objc.dg/set-not-used-1.m: New
index 541b5835c356938e4107adf2a01916d61c0752a7..dd1d8cf985d9f201209cc341caf82c77072fc556 100644 (file)
@@ -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 <objc/objc.h>
-#include <objc/Object.h>
 extern void abort (void);
 /*
 struct __objcFastEnumerationState
index e158502181395a51eabf5f12d9ff97187aff79dc..1e9c515f600595748264a046fb8865c929e87fa7 100644 (file)
@@ -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 <objc/objc.h>
-#include <objc/Object.h>
+#import "../objc-obj-c++-shared/Object1.h"
+#import "../objc-obj-c++-shared/next-mapping.h"
+#ifndef __NEXT_RUNTIME__
 #include <objc/NXConstStr.h>
+#endif
+
+extern int printf (const char *, ...);
 #include <stdlib.h>
-extern void abort (void);
+
 /*
 struct __objcFastEnumerationState
 {
index 893631fd423cf8a45d154ee0566116a334ea7310..da23f83799b7ba8f589677ec3d866c24c0ceab9d 100644 (file)
@@ -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 <objc/objc.h>
-#include <objc/Object.h>
+#import "../objc-obj-c++-shared/Object1.h"
+#import "../objc-obj-c++-shared/next-mapping.h"
+#ifndef __NEXT_RUNTIME__
 #include <objc/NXConstStr.h>
+#endif
+
+extern int printf (const char *, ...);
 #include <stdlib.h>
-extern void abort (void);
+
 /*
 struct __objcFastEnumerationState
 {
index c9cd977b0958207d2a782cf6bca109f870e8b37a..b6cfe2c0c659342e98becf5c21a407c3ba595c9e 100644 (file)
@@ -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 <objc/objc.h>
-#include <objc/Object.h>
+#import "../objc-obj-c++-shared/Object1.h"
+#import "../objc-obj-c++-shared/next-mapping.h"
+#ifndef __NEXT_RUNTIME__
 #include <objc/NXConstStr.h>
+#endif
+
+extern int printf (const char *, ...);
 #include <stdlib.h>
-extern void abort (void);
+
 /*
 struct __objcFastEnumerationState
 {
index b3579970ea0862ab6c85db2d32d0c882f261994e..f6d34f41399a868a7ad187079872343945125d1c 100644 (file)
@@ -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 <objc/objc.h>
-#include <objc/Object.h>
+#import "../objc-obj-c++-shared/Object1.h"
+#import "../objc-obj-c++-shared/next-mapping.h"
+#ifndef __NEXT_RUNTIME__
 #include <objc/NXConstStr.h>
+#endif
+
+extern int printf (const char *, ...);
 #include <stdlib.h>
-extern void abort (void);
 
 typedef struct
 {
index 7a6b9609d8a1d0ec7827c6015ace4625d8ea5335..d368390cbcabfe8cff25091bc1d37e4402cb86d6 100644 (file)
@@ -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 <objc/objc.h>
-#include <objc/Object.h>
-extern void abort (void);
+#import "../objc-obj-c++-shared/Object1.h"
+#import "../objc-obj-c++-shared/next-mapping.h"
+
 /*
 struct __objcFastEnumerationState
 {
index 42bca82e3b953f6e0b9c4dd97ffbac48073a83d1..5da940f620ee7ef84aef16ca47880f526d5a0143 100644 (file)
@@ -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 <objc/objc.h>
-#include <objc/Object.h>
-extern void abort (void);
+#import "../objc-obj-c++-shared/Object1.h"
+#import "../objc-obj-c++-shared/next-mapping.h"
+
 /*
 struct __objcFastEnumerationState
 {
index 76e429e69417012087e71819511497ee52a02f2d..1a6c101f069ec3841bb7a02bb922ca912da18823 100644 (file)
@@ -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 <objc/objc-api.h>
 #include <Foundation/Foundation.h>
 
 // gcc -o foo foo.m -framework Foundation
index 95a950375a492b16a3360b8de250af88e44352e9..26c2dfce8e7965b4556b9871e36bdd62dddbd556 100644 (file)
@@ -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 <objc/objc-api.h>
 #import <Foundation/Foundation.h>
 
 NSArray * createTestVictim(unsigned capacity) {