OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [image-info.m] - Blame information for rev 801

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

Line No. Rev Author Line
1 704 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
 
6
/* { dg-do compile { target { *-*-darwin* } } } */
7
/* { dg-skip-if "NeXT-only" { *-*-* } { "-fgnu-runtime" } { "" } } */
8
/* { dg-options "-freplace-objc-classes" } */
9
 
10
#include <objc/objc.h>
11
#include <objc/Object.h>
12
 
13
extern void abort(void);
14
#define CHECK_IF(expr) if(!(expr)) abort();
15
 
16
@interface Object (TEST_SUITE_C1)
17
- init;
18
@end
19
@implementation Object (TEST_SUITE_C1)
20
- init {return self;}
21
@end
22
 
23
@interface Base: Object {
24
@public
25
  int a;
26
  float b;
27
  char c;
28
}
29
- init;
30
@end
31
 
32
@implementation Base
33
- init {
34
  [super init];
35
  a = 123;
36
  b = 1.23;
37
  c = 'c';
38
  return self;
39
}
40
@end
41
 
42
/* { dg-final { scan-assembler "\t.section __OBJC, __image_info.*\n\t.align.*\nL_OBJC_ImageInfo.*:\n\t.long\t0\n\t.long\t1"  { target { *-*-darwin* && { ! lp64 } } } } } */
43
/* { dg-final { scan-assembler "\t.section __DATA, __objc_imageinfo.*\n\t.align.*\nL_OBJC_ImageInfo.*:\n\t.long\t0\n\t.long\t17" { target { *-*-darwin* && { lp64 } } } } } */

powered by: WebSVN 2.1.0

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