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/] [objc.dg/] [image-info.m] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* Check if the '-freplace-objc-classes' option causes the
2
   __OBJC,__image_info section to be emitted.  This is only
3
   usable on MacOS X 10.3 and later. */
4
/* Contributed by Ziemowit Laski <zlaski@apple.com>.  */
5
/* { dg-options "-freplace-objc-classes" } */
6
/* { dg-do compile { target *-*-darwin* } } */
7
 
8
#ifndef __NEXT_RUNTIME__
9
#error Feature not currently supported by the GNU runtime
10
#endif
11
 
12
#include <objc/objc.h>
13
#include <objc/Object.h>
14
 
15
extern void abort(void);
16
 
17
#define CHECK_IF(expr) if(!(expr)) abort();
18
 
19
@interface Base: Object {
20
@public
21
  int a;
22
  float b;
23
  char c;
24
}
25
- init;
26
@end
27
 
28
@implementation Base
29
- init {
30
  [super init];
31
  a = 123;
32
  b = 1.23;
33
  c = 'c';
34
  return self;
35
}
36
@end
37
 
38
/* { dg-final { scan-assembler "\t.section __OBJC, __image_info.*\n\t.align.*\nL_OBJC_IMAGE_INFO.*:\n\t.long\t0\n\t.long\t1" } } */

powered by: WebSVN 2.1.0

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