diff options
Diffstat (limited to 'llvm/test/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll')
-rw-r--r-- | llvm/test/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll b/llvm/test/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll new file mode 100644 index 00000000000..5743e42f9d2 --- /dev/null +++ b/llvm/test/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll @@ -0,0 +1,20 @@ +; RUN: llvm-upgrade < %s | llvm-as | 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 +} + |