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-5.m] - Blame information for rev 825

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

Line No. Rev Author Line
1 149 jeremybenn
/* Positive test case for constant string layout.  */
2
/* Contributed by Ziemowit Laski  <zlaski@apple.com>.  */
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.