summaryrefslogtreecommitdiff
path: root/test/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll
blob: 66e7d121a9efe0dab4caaea1a52512ae70688920 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep '%G = alloca int'

; In this testcase, %bar stores to the global G.  Make sure that inlining does
; not cause it to store to the G in main instead.

%G = global int 7

int %main() {
	%G = alloca int
	store int 0, int* %G
	call void %bar()
	%RV = load int* %G
	ret int %RV
}

internal void %bar() {
	store int 123, int* %G
	ret void
}