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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [objc.dg/] [const-str-11.m] - Blame information for rev 853

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

Line No. Rev Author Line
1 149 jeremybenn
/* Test if ObjC constant string layout is checked properly, regardless of how
2
   constant string classes get derived.  */
3
/* Contributed by Ziemowit Laski <zlaski@apple.com>  */
4
 
5
/* { dg-options "-fnext-runtime -fconstant-string-class=XStr" } */
6
/* { dg-do compile { target *-*-darwin* } } */
7
 
8
#include <objc/Object.h>
9
 
10
@interface XString: Object {
11
@protected
12
    char *bytes;
13
}
14
@end
15
 
16
@interface XStr : XString {
17
@public
18
    unsigned int len;
19
}
20
@end
21
 
22
extern struct objc_class _XStrClassReference;
23
 
24
const XStr *appKey = @"MyApp";
25
 
26
/* { dg-final { scan-assembler ".section __OBJC, __cstring_object" } } */
27
/* { dg-final { scan-assembler ".long\t__XStrClassReference\n\t.long\t.*\n\t.long\t5\n\t.data" } } */

powered by: WebSVN 2.1.0

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