1 /* Check that the '-fzero-link' flag doesn't prevent messaging from working. */
2 /* Contributed by Ziemowit Laski <zlaski@apple.com>. */
4 /* { dg-do run { target *-*-darwin* } } */
5 /* { dg-options "-fzero-link" } */
6 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
8 #include "../objc-obj-c++-shared/Object1.h"
9 //#import <objc/objc.h>
11 extern void abort(void);
12 #define CHECK_IF(expr) if(!(expr)) abort();
14 @interface Base: Object
19 + (int) getValue { return 1593; }
23 int val = [Base getValue];
24 CHECK_IF(val == 1593);
28 #include "../objc-obj-c++-shared/Object1-implementation.h"