1 /* Test to make sure that the const objc strings are the same across
3 /* Developed by Andrew Pinski <pinskia@physics.uc.edu> */
5 /* { dg-options "-fconstant-string-class=Foo" } */
7 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
9 #include "../objc-obj-c++-shared/Object1.h"
10 #include "../objc-obj-c++-shared/next-mapping.h"
14 #include <objc/objc.h>
16 @interface Foo: Object {
20 - (char *)customString;
23 #ifdef NEXT_OBJC_USE_NEW_INTERFACE
24 struct fudge_objc_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");
47 #include "../objc-obj-c++-shared/Object1-implementation.h"