aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-01-28 00:45:28 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-01-28 00:45:28 +0000
commit104fff8e5a2789d63cbb8e568f2266947b13fd77 (patch)
treed788c6cd5a27b2d7c30578d07e54d514385511af
parentea830ef21f1f863886455fabfc64ea00b172aeeb (diff)
Test case for PR1137. This makes sure that we don't get erroneous
"redefinition" errors that cause the upgrade to fail. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33593 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Assembler/2007-01-27-UpgradePointers.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/Assembler/2007-01-27-UpgradePointers.ll b/test/Assembler/2007-01-27-UpgradePointers.ll
new file mode 100644
index 0000000000..37825a2056
--- /dev/null
+++ b/test/Assembler/2007-01-27-UpgradePointers.ll
@@ -0,0 +1,21 @@
+; PR1137
+; RUN: llvm-upgrade < %s &&
+; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f &&
+; RUN: llvm-upgrade < %s | grep 'tmp = alloca' | wc -l | grep 1
+;
+target datalayout = "e-p:32:32"
+target endian = little
+target pointersize = 32
+target triple = "i686-pc-linux-gnu"
+
+implementation ; Functions:
+
+void %main() {
+entry:
+ %tmp = alloca uint, align 4 ; <uint*> [#uses=1]
+ %tmp = alloca int, align 4 ; <int*> [#uses=1]
+ "alloca point" = cast int 0 to int ; <int> [#uses=0]
+ store uint 1, uint* %tmp
+ store int 2, int* %tmp
+ ret void
+}