common.opt (optimize_fast): New Variable.
[official-gcc.git] / gcc / testsuite / objc.dg / torture / strings / const-str-9.m
blobddbe93dde09a22010150a1282ac2e4773adcb4d5
1 /* Test if ObjC constant strings get placed in the correct section.  */
2 /* Contributed by Ziemowit Laski <zlaski@apple.com>  */
4 /* { dg-do compile } */
5 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
6 /* { dg-options "-mno-constant-cfstrings" { target *-*-darwin* } } */
8 #include "../../../objc-obj-c++-shared/Object1.h"
10 @interface NSConstantString: Object {
11   char *cString;
12   unsigned int len;
14 @end
16 #ifndef NEXT_OBJC_USE_NEW_INTERFACE
17 extern struct objc_class _NSConstantStringClassReference;
18 #else
19 Class _NSConstantStringClassReference;
20 #endif
22 const NSConstantString *appKey = @"MyApp";
24 /* { dg-final { scan-assembler ".section __OBJC, __cstring_object" } } */
25 /* { dg-final { scan-assembler ".long\t__NSConstantStringClassReference\n\t.long\t.*\n\t.long\t5\n\t.data" { target { *-*-darwin* && { ! lp64 } } } } } */
26 /* { dg-final { scan-assembler ".quad\t__NSConstantStringClassReference\n\t.quad\t.*\n\t.long\t5\n\t.space" { target { *-*-darwin* && { lp64 } } } } } */