URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [objc.dg/] [zero-link-1.m] - Rev 320
Go to most recent revision | Compare with Previous | Blame | View Log
/* Check if the '-fzero-link' flag correctly emits an objc_getClass() call. */ /* Contributed by Ziemowit Laski <zlaski@apple.com>. */ /* { dg-do compile { target *-*-darwin* } } */ /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ /* { dg-options "-fzero-link" } */ #include "../objc-obj-c++-shared/Object1.h" #include <objc/objc.h> extern void abort(void); #define CHECK_IF(expr) if(!(expr)) abort(); @interface Base: Object + (int) getValue; @end @implementation Base + (int) getValue { return 1593; } @end int main(void) { int val = [Base getValue]; CHECK_IF(val == 1593); return 0; } /* { dg-final { scan-assembler-not "_OBJC_CLASS_REFERENCES_0" } } */ /* { dg-final { scan-assembler "objc_getClass" } } */
Go to most recent revision | Compare with Previous | Blame | View Log