adjust recent tests for -fnext-runtime:

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.

From-SVN: r165461
This commit is contained in:
Iain Sandoe 2010-10-14 10:40:07 +00:00
parent 48476d13b2
commit a16ced220f
4 changed files with 29 additions and 2 deletions

View File

@ -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.

View File

@ -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[]) {

View File

@ -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

View File

@ -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)
{