OSDN Git Service

In gcc/testsuite/:
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / objc.dg / lookup-1.m
index 71fc61e..ff59b7e 100644 (file)
@@ -1,7 +1,8 @@
-/* { dg-do run { target *-*-darwin* } } */
+/* { dg-do run } */
+/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 
-#include <objc/Object.h>
 #include <stdlib.h>
+#include "../objc-obj-c++-shared/Object1.h"
 
 typedef struct MyWidget {
   int a;
@@ -35,7 +36,7 @@ MyWidget gWidget = { 17 };
 @implementation Container
 + (MyWidget *)elementForView:(Foo *)view
 {
-  MyWidget *widget = nil;
+  MyWidget *widget = (MyWidget *) nil;
   if ([view conformsTo:@protocol(MyProto)]) {
     widget = [(Foo <MyProto> *)view widget];
   }
@@ -52,3 +53,5 @@ int main(void) {
 
   return 0;
 }
+
+#include "../objc-obj-c++-shared/Object1-implementation.h"