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