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.5.1/] [gcc/] [testsuite/] [obj-c++.dg/] [const-str-5.mm] - Blame information for rev 484

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

Line No. Rev Author Line
1 308 jeremybenn
/* Positive test case for constant string layout.  */
2
/* Contributed by Ziemowit Laski  .  */
3
 
4
/* { dg-options "-fconstant-string-class=MyConstantString" } */
5
/* { dg-do compile } */
6
 
7
@interface MyBase {
8
  const char *p;
9
}
10
@end
11
 
12
@interface MyConstantString: MyBase {
13
  union {
14
    void     *u;
15
    unsigned char   *c;
16
  } _contents;
17
  unsigned int  _count;
18
}
19
@end
20
 
21
/* The NeXT runtime initializes the 'isa' pointer of string constants at
22
   compile time.  */
23
#ifdef __NEXT_RUNTIME__
24
extern void *_MyConstantStringClassReference;
25
#endif
26
 
27
MyConstantString *str = @"Hello";

powered by: WebSVN 2.1.0

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