blob: dd04ae05f6341e49ea8f92503e4c9b7d8727d9bf [file] [log] [blame]
Rafael Espindolaf3336bc2014-03-12 20:15:49 +00001; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
2
3
4declare void @f()
5@fa = alias void ()* @f
6; CHECK: Alias must point to a definition
7; CHECK-NEXT: @fa
8
9@g = external global i32
10@ga = alias i32* @g
11; CHECK: Alias must point to a definition
12; CHECK-NEXT: @ga
Rafael Espindola64c1e182014-06-03 02:41:57 +000013
14
15@test2_a = alias i32* @test2_b
16@test2_b = alias i32* @test2_a
17; CHECK: Aliases cannot form a cycle
18; CHECK-NEXT: i32* @test2_a
19; CHECK-NEXT: Aliases cannot form a cycle
20; CHECK-NEXT: i32* @test2_b
21
22
23@test3_a = global i32 42
Rafael Espindola464fe022014-07-30 22:51:54 +000024@test3_b = weak alias i32* @test3_a
Rafael Espindola64c1e182014-06-03 02:41:57 +000025@test3_c = alias i32* @test3_b
26; CHECK: Alias cannot point to a weak alias
27; CHECK-NEXT: i32* @test3_c