LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 1137 - llvm-upgrade can't do uint* %x and int* %x together.
Summary: llvm-upgrade can't do uint* %x and int* %x together.
Status: RESOLVED FIXED
Alias: None
Product: tools
Classification: Unclassified
Component: llvm-upgrade (show other bugs)
Version: trunk
Hardware: PC Linux
: P normal
Assignee: Reid Spencer
URL:
Keywords: compile-fail
Depends on:
Blocks:
 
Reported: 2007-01-27 16:57 PST by Nikhil Patil
Modified: 2018-11-07 00:22 PST (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikhil Patil 2007-01-27 16:57:08 PST
llvm-upgrade cannot upgrade the following program:

; ModuleID = 'b.c'
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
        br label %return

return:         ; preds = %entry
        ret void
}

It fails with: Redefinition of value named 'tmp' in the 'i32 *' type plane


(The above program was produced by compiling the following with the llvm-gcc4-
1.9-x86-FC5 binary:
void main()
{
    {
        unsigned int tmp = 1;
    }
    {
        int tmp = 2;
    }
}
Comment 1 Reid Spencer 2007-01-27 17:56:36 PST
That's a bit scarey. I'll look into this right away.
Comment 3 Nikhil Patil 2007-01-27 19:24:05 PST
Wow, fixed within two hours of reporting!
that's a great turnaround time... :-)