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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [objc.dg/] [const-str-9.m] - Blame information for rev 859

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

Line No. Rev Author Line
1 309 jeremybenn
/* Test if ObjC constant strings get placed in the correct section.  */
2
/* Contributed by Ziemowit Laski <zlaski@apple.com>  */
3
 
4
/* { dg-do compile } */
5
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
6
 
7
#include "../objc-obj-c++-shared/Object1.h"
8
 
9
@interface NSConstantString: Object {
10
  char *cString;
11
  unsigned int len;
12
}
13
@end
14
 
15
#ifndef NEXT_OBJC_USE_NEW_INTERFACE
16
extern struct objc_class _NSConstantStringClassReference;
17
#else
18
Class _NSConstantStringClassReference;
19
#endif
20
 
21
const NSConstantString *appKey = @"MyApp";
22
 
23
/* { dg-final { scan-assembler ".section __OBJC, __cstring_object" } } */
24
/* { dg-final { scan-assembler ".long\t__NSConstantStringClassReference\n\t.long\t.*\n\t.long\t5\n\t.data" { target { *-*-darwin* && { ! lp64 } } } } } */
25
/* { dg-final { scan-assembler ".quad\t__NSConstantStringClassReference\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.