1 ; RUN: llvm-link -S -o %t %s %p/Inputs/comdat-rm-dst.ll
2 ; RUN: FileCheck %s < %t
3 ; RUN: FileCheck --check-prefix=RM %s < %t
5 target datalayout = "e-m:w-p:32:32-i64:64-f80:32-n8:16:32-S32"
6 target triple = "i686-pc-windows-msvc"
9 @foo = global i32 42, comdat
10 ; CHECK-DAG: @foo = global i64 43, comdat
13 @alias = alias i32, i32* @foo
15 ; We should arguably reject an out of comdat reference to int_alias. Given that
16 ; the verifier accepts it, test that we at least produce an output that passes
18 ; CHECK-DAG: @int_alias = external global i32
19 @int_alias = internal alias i32, i32* @foo
20 @bar = global i32* @int_alias
22 @func_alias = alias void (), void ()* @func
23 @zed = global void()* @func_alias
24 ; CHECK-DAG: @zed = global void ()* @func_alias
25 ; CHECK-DAG: declare void @func_alias()
28 define void @func() comdat($foo) {
33 @var = global i32 42, comdat($foo)