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-9.m] - Blame information for rev 844

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 <zlaski@apple.com>  */
3
 
4
/* { dg-options "-fnext-runtime" } */
5
/* { dg-do compile { target *-*-darwin* } } */
6
 
7
#include <objc/Object.h>
8
 
9
@interface NSConstantString: Object {
10
  char *cString;
11
  unsigned int len;
12
}
13
@end
14
 
15
extern struct objc_class _NSConstantStringClassReference;
16
 
17
static const NSConstantString *appKey = @"MyApp";
18
 
19
/* { dg-final { scan-assembler ".section __OBJC, __cstring_object" } } */
20
/* { 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.