diff options
Diffstat (limited to 'gcc/testsuite/objc.dg/const-cfstring-4.m')
-rw-r--r-- | gcc/testsuite/objc.dg/const-cfstring-4.m | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/objc.dg/const-cfstring-4.m b/gcc/testsuite/objc.dg/const-cfstring-4.m new file mode 100644 index 00000000000..9078bfa2313 --- /dev/null +++ b/gcc/testsuite/objc.dg/const-cfstring-4.m @@ -0,0 +1,12 @@ +/* APPLE LOCAL file constant strings */ +/* Test if constant CFStrings get placed in the correct section. */ +/* Contributed by Ziemowit Laski <zlaski@apple.com> */ + +/* { dg-options "-fconstant-cfstrings" } */ +/* { dg-do compile { target *-*-darwin* } } */ + +typedef const struct __CFString * CFStringRef; +static CFStringRef appKey = (CFStringRef) @"com.apple.soundpref"; + +/* { dg-final { scan-assembler ".section __DATA, __cfstring" } } */ +/* { dg-final { scan-assembler ".long\t___CFConstantStringClassReference\n\t.long\t1992\n\t.long\t.*\n\t.long\t19\n\t.data" } } */ |