1 /* Check if the '-fno-zero-link' flag correctly _omits_ an objc_getClass() call. */
2 /* Contributed by Ziemowit Laski <zlaski@apple.com>. */
4 /* { dg-do compile { target *-*-darwin* } } */
5 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
6 /* { dg-options "-fno-zero-link" } */
8 #include "../objc-obj-c++-shared/Object1.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 /* { dg-final { scan-assembler "_OBJC_CLASS_REFERENCES_0" } } */
29 /* { dg-final { scan-assembler-not "objc_getClass" } } */