* lto.c (do_stream_out): Add PART parameter; open dump file.
[official-gcc.git] / gcc / testsuite / obj-c++.dg / strings / const-str-12.mm
blobd0dfb668ea93b666077eedf3ffc9cfcdd3858100
1 /* Test if ObjC types play nice in conditional expressions.  */
2 /* Author: Ziemowit Laski  */
4 /* { dg-do compile } */
5 /* { dg-options "-fconstant-string-class=Foo" } */
6 /* { dg-options "-mno-constant-cfstrings -fconstant-string-class=Foo" { target *-*-darwin* } } */
8 #ifdef __NEXT_RUNTIME__
9 #include <Foundation/NSObject.h>
10 #define OBJECT NSObject
11 #else
12 #include <objc/Object.h>
13 #define OBJECT Object
14 #endif
15 #include "../../objc-obj-c++-shared/objc-test-suite-types.h"
17 @interface Foo: OBJECT {
18   char *cString;
19   unsigned int len;
21 + (id)description;
22 @end
24 @interface Bar: OBJECT
25 + (Foo *) getString: (int) which;
26 @end
28 TNS_STRING_REF_T _FooClassReference;  /* Only used by NeXT.  */
30 @implementation Bar
31 + (Foo *) getString: (int) which {
32   return which? [Foo description]: @"Hello";
34 @end