1 /* Test if ObjC constant string layout is checked properly, regardless of how
2 constant string classes get derived. */
3 /* Contributed by Ziemowit Laski <zlaski@apple.com> */
5 /* { dg-options "-fnext-runtime -fconstant-string-class=XStr" } */
6 /* { dg-do compile { target *-*-darwin* } } */
8 #include <objc/Object.h>
10 @interface XString: Object {
16 @interface XStr : XString {
22 extern struct objc_class _XStrClassReference;
24 const XStr *appKey = @"MyApp";
26 /* { dg-final { scan-assembler ".section __OBJC, __cstring_object" } } */
27 /* { dg-final { scan-assembler ".long\t__XStrClassReference\n\t.long\t.*\n\t.long\t5\n\t.data" } } */