Patchwork [objc/testsuite,committed] adjust recent test additions for -fnext-runtime

login
register
mail settings
Submitter IainS
Date Oct. 14, 2010, 10:44 a.m.
Message ID <D3938541-E3BB-45C4-8F94-9AC01463C83A@sandoe-acoustics.co.uk>
Download mbox | patch
Permalink /patch/67806/
State New
Headers show

Comments

IainS - Oct. 14, 2010, 10:44 a.m.
I applied this to resolve issues reported with a few of the new tests,
r165461
Iain

gcc/testsuite:
	* objc.dg/pr45878.m: Update to include NSConstantString interface
	for -fnext-runtime.
	* objc.dg/pr23214.m: Use the Object1.m implementation to build m64 on
	-fnext-runtime, XFAIL the m64 -fnext-runtime run.
	* objc.dg/objc-foreach-4.m: Provide an NSConstantString dummy class
	reference for m64 -fnext-runtime.

Patch

Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog	(revision 165460)
+++ gcc/testsuite/ChangeLog	(working copy)
@@ -1,3 +1,12 @@ 
+2010-10-14  Iain Sandoe  <iains@gcc.gnu.org>
+
+	* objc.dg/pr45878.m: Update to include NSConstantString interface
+	for -fnext-runtime.
+	* objc.dg/pr23214.m: Use the Object1.m implementation to build m64 on
+	-fnext-runtime, XFAIL the m64 -fnext-runtime run.
+	* objc.dg/objc-foreach-4.m: Provide an NSConstantString dummy class
+	reference for m64 -fnext-runtime.
+
 2010-10-14  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* gcc.target/i386/vect-sizes-1.c: New.
Index: gcc/testsuite/objc.dg/pr45878.m
===================================================================
--- gcc/testsuite/objc.dg/pr45878.m	(revision 165460)
+++ gcc/testsuite/objc.dg/pr45878.m	(working copy)
@@ -11,12 +11,22 @@  typedef unsigned char  BOOL;
 - (BOOL)isEqual:anObject;
 @end
 
+#ifdef __NEXT_RUNTIME__
+@interface NSConstantString: Object
+{
+  char *c_string;
+  unsigned int len;
+}
+@end
+extern void *_NSConstantStringClassReference;
+#else
 @interface NXConstantString: Object
 {
   char *c_string;
   unsigned int len;
 }
 @end
+#endif
 
 void function (void)
 {
Index: gcc/testsuite/objc.dg/pr23214.m
===================================================================
--- gcc/testsuite/objc.dg/pr23214.m	(revision 165460)
+++ gcc/testsuite/objc.dg/pr23214.m	(working copy)
@@ -2,9 +2,11 @@ 
    Protocol instances.  */
 
 /* { 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/Object.h>
-#include <objc/Protocol.h>
+#import "../objc-obj-c++-shared/Object1.h"
+#import "../objc-obj-c++-shared/Protocol1.h"
 
 @protocol A
 @end
Index: gcc/testsuite/objc.dg/objc-foreach-4.m
===================================================================
--- gcc/testsuite/objc.dg/objc-foreach-4.m	(revision 165460)
+++ gcc/testsuite/objc.dg/objc-foreach-4.m	(working copy)
@@ -6,6 +6,12 @@ 
 #include <objc/objc-api.h>
 #include <Foundation/Foundation.h>
 
+#if defined (__NEXT_RUNTIME__) && defined (__LP64__)
+/* Fudge the class reference until we implement the compiler-side 
+   const strings.  */
+extern void *_NSConstantStringClassReference;
+#endif
+
 // gcc -o foo foo.m -framework Foundation
 
 int main (int argc, char const* argv[]) {