1 /* All calls must be properly stubified. */
2 /* Testcase extracted from TextEdit:Document.m. */
4 /* { dg-do compile { target *-*-darwin* } } */
5 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
6 /* { dg-options "-mdynamic-no-pic -fdump-rtl-jump" } */
8 typedef struct objc_object { } *id ;
10 extern id objc_msgSend(id self, char * op, ...);
11 extern int bogonic (int, int, int) ;
12 @interface Document {}
13 - (Document *) window;
17 @implementation Document
18 - (Document *) class { }
19 - (Document *) close { }
20 - (Document *) window { }
21 - (void)willEndCloseSheet:(void *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo {
22 [[self window] close];
23 ((void (*)(id, char *, int))objc_msgSend)([self class], (char *)contextInfo, 1);
24 ((void (*)(id, char *, int))bogonic)([self class], (char *)contextInfo, 1);
30 /* Any symbol_ref of an un-stubified objc_msgSend is an error; look
31 for "objc_msgSend" in quotes, without the $stub suffix. */
32 /* { dg-final { scan-rtl-dump-not "symbol_ref.*\"objc_msgSend\"" "jump" } } */