1 /* Test if ObjC constant strings get placed in the correct section. */
2 /* Contributed by Ziemowit Laski <zlaski@apple.com> */
4 /* { dg-options "-fnext-runtime" } */
5 /* { dg-do compile { target *-*-darwin* } } */
6 /* { dg-skip-if "" { *-*-darwin* } { "-m64" } { "" } } */
8 #include <objc/Object.h>
10 @interface NSConstantString: Object {
16 extern struct objc_class _NSConstantStringClassReference;
18 const NSConstantString *appKey = @"MyApp";
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" } } */