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