aboutsummaryrefslogtreecommitdiffstats
path: root/test/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll')
-rw-r--r--test/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll b/test/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll
new file mode 100644
index 0000000..d558d0b
--- /dev/null
+++ b/test/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll
@@ -0,0 +1,21 @@
+; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | \
+; RUN: 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
+}
+