-/* { dg-do run { target *-*-darwin* } } */
+/* { 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 <stdlib.h>
+#include "../objc-obj-c++-shared/Object1.h"
typedef struct MyWidget {
int a;
@implementation Container
+ (MyWidget *)elementForView:(Foo *)view
{
- MyWidget *widget = nil;
+ MyWidget *widget = (MyWidget *) nil;
if ([view conformsTo:@protocol(MyProto)]) {
widget = [(Foo <MyProto> *)view widget];
}