aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/objc.dg/pr45878.m
blob: 60db350c0c1ed04f15ea5b3b0b8b03eef4aa7ea3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* { dg-do compile } */
/* { dg-options "-O2 -fexceptions" } */

typedef struct objc_object { Class class_pointer; } *id;
typedef unsigned char  BOOL;

@interface Object
{
  Class isa;
}
@end

@interface Object (Test)
- (BOOL)testIsEqual:anObject;
@end

@implementation Object (Test)
- (BOOL)testIsEqual:anObject
{
  return self == anObject;
}
@end

#ifdef __NEXT_RUNTIME__
@interface NSConstantString: Object
{
  char *c_string;
  unsigned int len;
}
@end
extern void *_NSConstantStringClassReference;
#else
@interface NXConstantString: Object
{
  char *c_string;
  unsigned int len;
}
@end
#endif

void function (void)
{
  if ([@"strings" testIsEqual: (id)0])
    {
      ;
    }
}