diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
commit | 13cc256e404620c1de0cbcc4e43ce1e2dbbc4898 (patch) | |
tree | 2732d02d7d51218d6eed98ac7fcfc5b8794896b5 /test/CodeGen/const-label-addr.c | |
parent | 657bc3d9848e3be92029b2416031340988cd0111 (diff) |
Notes
Diffstat (limited to 'test/CodeGen/const-label-addr.c')
-rw-r--r-- | test/CodeGen/const-label-addr.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test/CodeGen/const-label-addr.c b/test/CodeGen/const-label-addr.c index 9d99f88c8a65..e606c3b2cda2 100644 --- a/test/CodeGen/const-label-addr.c +++ b/test/CodeGen/const-label-addr.c @@ -1,4 +1,17 @@ -// RUN: %clang_cc1 %s -emit-llvm -o %t +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s +// REQUIRES: asserts + +// CHECK: @a.a = internal global i8* blockaddress(@a, %A) int a() { A:;static void* a = &&A; } + +// PR14005 +// CHECK: @b.ar = internal global {{.*}} sub (i{{..}} ptrtoint (i8* blockaddress(@b, %l2) to i{{..}}), i{{..}} ptrtoint (i8* blockaddress(@b, %l1) to i{{..}})) +int b() { + static int ar = &&l2 - &&l1; +l1: + return 10; +l2: + return 11; +} |