• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: %clang_cc1 -emit-llvm -o %t %s
2
3@interface Object
4- (id) new;
5@end
6
7typedef struct {int x, y, w, h;} st1;
8typedef struct {int x, y, w, h;} st2;
9
10@interface bar : Object
11- (void)setFrame:(st1)frameRect;
12@end
13
14@interface bar1 : Object
15- (void)setFrame:(int)frameRect;
16@end
17
18@interface foo : Object
19{
20	st2 ivar;
21}
22@property (assign) st2 frame;
23@end
24
25@implementation foo
26@synthesize frame = ivar;
27@end
28
29extern void abort();
30
31static   st2 r = {1,2,3,4};
32st2 test (void)
33{
34    foo *obj = [foo new];
35    id objid = [foo new];;
36
37    obj.frame = r;
38
39    ((foo*)objid).frame = obj.frame;
40
41    return ((foo*)objid).frame;
42}
43
44int main ()
45{
46  st2 res = test ();
47  if (res.x != 1 || res.h != 4)
48    abort();
49  return 0;
50}
51