1 /* Test for assigning compile-time constant-string objects to static variables. */
2 /* Contributed by Ziemowit Laski <zlaski@apple.com> */
4 /* { dg-options "-fnext-runtime -fconstant-string-class=Foo -lobjc" } */
5 /* { dg-do run { target *-*-darwin* } } */
9 #include <objc/Object.h>
11 @interface Foo: Object {
17 struct objc_class _FooClassReference;
19 @implementation Foo : Object
20 - (char *)customString {
25 static const Foo *appKey = @"MyApp";
26 static int CFPreferencesSynchronize (const Foo *ref) {
30 static void PrefsSynchronize(void)
32 if(!CFPreferencesSynchronize(appKey))