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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [objc.dg/] [const-str-11.m] - Blame information for rev 309

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 309 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-do compile { target *-*-darwin* } } */
6
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
7
/* { dg-options "-fconstant-string-class=XStr" } */
8
 
9
#include "../objc-obj-c++-shared/Object1.h"
10
 
11
@interface XString: Object {
12
@protected
13
    char *bytes;
14
}
15
@end
16
 
17
@interface XStr : XString {
18
@public
19
    unsigned int len;
20
}
21
@end
22
 
23
#ifndef NEXT_OBJC_USE_NEW_INTERFACE
24
extern struct objc_class _XStrClassReference;
25
#else
26
extern Class _XStrClassReference;
27
#endif
28
 
29
const XStr *appKey = @"MyApp";
30
 
31
/* { dg-final { scan-assembler ".section __OBJC, __cstring_object" } } */
32
/* { dg-final { scan-assembler ".long\t__XStrClassReference\n\t.long\t.*\n\t.long\t5\n\t.data"  { target { *-*-darwin* && { ! lp64 } } } } } */
33
/* { dg-final { scan-assembler ".quad\t__XStrClassReference\n\t.quad\t.*\n\t.long\t5\n\t.space" { target { *-*-darwin* && { lp64 } } } } } */

powered by: WebSVN 2.1.0

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