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-options "-mno-constant-cfstrings -fconstant-string-class=Foo" { target *-*-darwin* } } */
6 /* { dg-additional-sources "../../../objc-obj-c++-shared/Object1.m" } */
8 #include "../../../objc-obj-c++-shared/Object1.h"
11 @interface Foo: Object {
17 #ifdef NEXT_OBJC_USE_NEW_INTERFACE
18 Class _FooClassReference;
20 struct objc_class _FooClassReference;
23 @implementation Foo : Object
24 - (char *)customString {
29 static const Foo *appKey = @"MyApp";
30 static int CFPreferencesSynchronize (const Foo *ref) {
34 static void PrefsSynchronize(void)
36 if(!CFPreferencesSynchronize(appKey))