* tree-loop-distribution.c (struct partition): New field recording
[official-gcc.git] / gcc / testsuite / objc.dg / image-info.m
blob09329130a7364fbbebeb938ea8519f1724ab143c
1 /* 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>.  */
6 /* { dg-do compile { target { *-*-darwin* } } } */
7 /* { dg-skip-if "NeXT-only" { *-*-* } { "-fgnu-runtime" } { "" } } */
8 /* { dg-options "-freplace-objc-classes" } */
10 #include <Foundation/NSObject.h>
12 extern void abort(void);
13 #define CHECK_IF(expr) if(!(expr)) abort();
15 @interface NSObject (TEST_SUITE_C1)
16 - init;
17 @end
18 @implementation NSObject (TEST_SUITE_C1)
19 - init {return self;}
20 @end
22 @interface Base: NSObject {
23 @public
24   int a;
25   float b;
26   char c;
28 - init;
29 @end
31 @implementation Base
32 - init {
33   [super init];
34   a = 123;
35   b = 1.23;
36   c = 'c';
37   return self;
39 @end
41 /* { 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 } } } } } */
42 /* { 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 } } } } } */