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 {
16 #ifndef NEXT_OBJC_USE_NEW_INTERFACE
17 extern struct objc_class _NSConstantStringClassReference;
19 Class _NSConstantStringClassReference;
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 } } } } } */