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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [obj-c++.dg/] [const-str-9.mm] - Blame information for rev 823

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

Line No. Rev Author Line
1 149 jeremybenn
/* Test if ObjC constant strings get placed in the correct section.  */
2
/* Contributed by Ziemowit Laski   */
3
 
4
/* { dg-options "-fnext-runtime" } */
5
/* { dg-do compile { target *-*-darwin* } } */
6
/* { dg-skip-if "" { *-*-darwin* } { "-m64" } { "" } } */
7
 
8
#include 
9
 
10
@interface NSConstantString: Object {
11
  char *cString;
12
  unsigned int len;
13
}
14
@end
15
 
16
extern struct objc_class _NSConstantStringClassReference;
17
 
18
const NSConstantString *appKey = @"MyApp";
19
 
20
/* { dg-final { scan-assembler ".section __OBJC, __cstring_object" } } */
21
/* { dg-final { scan-assembler ".long\t__NSConstantStringClassReference\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.