blob: b617c9fee4ea583ad0d692fcbda721ee5fd604f2 [file] [log] [blame]
Fariborz Jahanian06b89122009-05-05 23:28:21 +00001// RUN: clang-cc -triple x86_64-darwin-10 -fobjc-gc -emit-llvm -o %t %s &&
Fariborz Jahanian102e3902009-06-01 21:29:32 +00002// RUN: grep objc_assign_strongCast %t | count 4 &&
Fariborz Jahanian06b89122009-05-05 23:28:21 +00003// RUN: true
4
5@interface A
6@end
7
8typedef struct s0 {
9 A *a[4];
10} T;
11
12T g0;
13
14void f0(id x) {
15 g0.a[0] = x;
16}
17
18void f1(id x) {
19 ((T*) &g0)->a[0] = x;
20}
21
Fariborz Jahanian102e3902009-06-01 21:29:32 +000022void f2(unsigned idx)
23{
24 id *keys;
25 keys[idx] = 0;
26}
27