1 /* All calls must be properly stubified. Complain about any "call
2 _objc_msgSend<end-of-line>" without the $stub suffix. */
4 /* { dg-do compile { target *-*-darwin* } } */
5 /* { dg-options "-Os -mdynamic-no-pic -fno-exceptions" } */
7 typedef struct objc_object { } *id ;
11 extern id objc_msgSend(id self, char * op, ...);
12 extern int bogonic (int, int, int);
15 @interface Document {}
16 - (Document *) window;
20 @implementation Document
21 - (Document *) class { }
22 - (Document *) close { }
23 - (Document *) window { }
24 - (void)willEndCloseSheet:(void *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo {
25 [[self window] close];
26 ((void (*)(id, char *, int))objc_msgSend)([self class], (char *)contextInfo, 1);
27 ((void (*)(id, char *, int))bogonic)([self class], (char *)contextInfo, 1);
33 /* { dg-final { scan-assembler-not "\(bl|call\)\[ \t\]+_objc_msgSend\n" } } */
34 /* { dg-final { scan-assembler "\(bl|call\)\[ \t\]+L_objc_msgSend\\\$stub\n" } } */
35 /* { dg-final { scan-assembler-not "\(bl|call\)\[ \t\]+_bogonic\n" } } */
36 /* { dg-final { scan-assembler "\(bl|call\)\[ \t\]+L_bogonic\\\$stub\n" } } */
37 /* { dg-final { scan-assembler-not "\\\$non_lazy_ptr" } } */