1 /* Test for assigning compile-time constant-string objects to static variables. */
2 /* Contributed by Ziemowit Laski <zlaski@apple.com> */
4 /* { dg-options "-fconstant-string-class=Foo" } */
5 /* { dg-do run { target *-*-darwin* } } */
7 #include "../objc-obj-c++-shared/Object1.h"
10 @interface Foo: Object {
16 #ifdef NEXT_OBJC_USE_NEW_INTERFACE
17 Class _FooClassReference;
19 struct objc_class _FooClassReference;
22 @implementation Foo : Object
23 - (char *)customString {
28 static const Foo *appKey = @"MyApp";
29 static int CFPreferencesSynchronize (const Foo *ref) {
33 static void PrefsSynchronize(void)
35 if(!CFPreferencesSynchronize(appKey))
44 #include "../objc-obj-c++-shared/Object1-implementation.h"