1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fblocks -emit-llvm -o - %s | FileCheck %s 2*f4a2713aSLionel Sambuc // pr8707 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc // CHECK: @block_block_invoke.test = internal global i32 5*f4a2713aSLionel Sambuc int (^block)(void) = ^ { 6*f4a2713aSLionel Sambuc static int test=0; 7*f4a2713aSLionel Sambuc return test; 8*f4a2713aSLionel Sambuc }; 9*f4a2713aSLionel Sambuc // CHECK: @block1_block_invoke_2.test = internal global i32 10*f4a2713aSLionel Sambuc void (^block1)(void) = ^ { 11*f4a2713aSLionel Sambuc static int test = 2; 12*f4a2713aSLionel Sambuc return; 13*f4a2713aSLionel Sambuc }; 14*f4a2713aSLionel Sambuc // CHECK: @block2_block_invoke_3.test = internal global i32 15*f4a2713aSLionel Sambuc int (^block2)(void) = ^ { 16*f4a2713aSLionel Sambuc static int test = 5; 17*f4a2713aSLionel Sambuc return test; 18*f4a2713aSLionel Sambuc }; 19*f4a2713aSLionel Sambuc 20