OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [obj-c++.dg/] [stubify-1.mm] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* All calls must be properly stubified.  Complain about any "call
2
   _objc_msgSend" without the $stub suffix.  */
3
 
4
/* { dg-do compile { target *-*-darwin* } } */
5
/* { dg-options "-Os -mdynamic-no-pic -fno-exceptions" } */
6
 
7
typedef struct objc_object { } *id ;
8
int x = 41 ;
9
 
10
extern "C" {
11
  extern id objc_msgSend(id self, char * op, ...);
12
  extern int bogonic (int, int, int);
13
}
14
 
15
@interface Document {}
16
- (Document *) window;
17
- (Document *) class;
18
- (Document *) close;
19
@end
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);
28
  bogonic (3, 4, 5);
29
  x++;
30
}
31
@end
32
 
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" } } */

powered by: WebSVN 2.1.0

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