1 /* Test to make sure that the const objc strings are the same across
3 /* Developed by Andrew Pinski <pinskia@physics.uc.edu> */
6 /* { dg-options "-fconstant-string-class=Foo" } */
7 /* { dg-options "-mno-constant-cfstrings -fconstant-string-class=Foo" { target *-*-darwin* } } */
8 /* { dg-additional-sources "../../../objc-obj-c++-shared/Object1.mm" } */
10 #include "../../../objc-obj-c++-shared/Object1.h"
14 #include <objc/objc.h>
16 @interface Foo: Object {
20 - (char *)customString;
23 #ifdef NEXT_OBJC_USE_NEW_INTERFACE
24 Class _FooClassReference;
26 struct objc_class _FooClassReference;
29 @implementation Foo : Object
30 - (char *)customString {
39 Foo *string2 = @"bla";
43 printf("Strings are being uniqued properly\n");