1 // RUN: %clang_cc1 -fblocks -emit-llvm %s -fobjc-gc -o - | FileCheck %s
3 // CHECK: objc_assign_strongCast
5 typedef __SIZE_TYPE__ size_t;
6 void * malloc(size_t size);
9 void (^ivarBlock)(void);
12 int main(int argc, char *argv[]) {
13 StructWithBlock_t *swbp = (StructWithBlock_t *)malloc(sizeof(StructWithBlock_t*));
15 // assigning a Block into an struct slot should elicit a write-barrier under GC
16 swbp->ivarBlock = ^ { ++i; };