OpenCores
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/] [stubify-1.m] - Blame information for rev 310

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 309 jeremybenn
/* All calls must be properly stubified.  Complain about any "call
2
   _objc_msgSend<end-of-line>" without the $stub suffix.  */
3
 
4
/* { dg-do compile { target *-*-darwin* } } */
5
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
6
/* { dg-require-effective-target ilp32 } */
7
/* { dg-options "-Os -mdynamic-no-pic -mmacosx-version-min=10.4" } */
8
 
9
typedef struct objc_object { } *id ;
10
int x = 41 ;
11
extern id objc_msgSend(id self, char * op, ...);
12
extern int bogonic (int, int, int) ;
13
@interface Document {}
14
- (Document *) window;
15
- (Document *) class;
16
- (Document *) close;
17
@end
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);
26
  bogonic (3, 4, 5);
27
  x++;
28
}
29
@end
30
 
31
/* { dg-final { scan-assembler-not "\(bl|call\)\[ \t\]+_objc_msgSend\n" } } */
32
/* { dg-final { scan-assembler     "\(bl|call\)\[ \t\]+L_objc_msgSend\\\$stub\n" } } */
33
/* { dg-final { scan-assembler-not "\(bl|call\)\[ \t\]+_bogonic\n" } } */
34
/* { dg-final { scan-assembler     "\(bl|call\)\[ \t\]+L_bogonic\\\$stub\n" } } */
35
/* { dg-final { scan-assembler-not "\\\$non_lazy_ptr" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.