1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s 2*f4a2713aSLionel Sambuc // REQUIRES: asserts 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc // CHECK: @a.a = internal global i8* blockaddress(@a, %A) a()5*f4a2713aSLionel Sambucint a() { 6*f4a2713aSLionel Sambuc A:;static void* a = &&A; 7*f4a2713aSLionel Sambuc } 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuc // PR14005 10*f4a2713aSLionel Sambuc // CHECK: @b.ar = internal global {{.*}} sub (i{{..}} ptrtoint (i8* blockaddress(@b, %l2) to i{{..}}), i{{..}} ptrtoint (i8* blockaddress(@b, %l1) to i{{..}})) b()11*f4a2713aSLionel Sambucint b() { 12*f4a2713aSLionel Sambuc static int ar = &&l2 - &&l1; 13*f4a2713aSLionel Sambuc l1: 14*f4a2713aSLionel Sambuc return 10; 15*f4a2713aSLionel Sambuc l2: 16*f4a2713aSLionel Sambuc return 11; 17*f4a2713aSLionel Sambuc } 18