[LLVMbugs] [Bug 78] New: gccld crashes on assertion

bugzilla-daemon at zion.cs.uiuc.edu bugzilla-daemon at zion.cs.uiuc.edu
Fri Oct 31 12:12:55 PST 2003


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=78

           Summary: gccld crashes on assertion
           Product: tools
           Version: 1.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gccld
        AssignedTo: criswell at uiuc.edu
        ReportedBy: criswell at uiuc.edu


The gccld program dies when attempting to link the bytecode file below.  The
command line and assertion reads as follows (I believe the puts error is innocuous):

gccld -o test2
-L/home/vadve/lattner/local/x86/llvm-gcc/bin/../lib/gcc/i686-pc-linux-gnu/3.4-llvm
-L/home/vadve/lattner/local/x86/llvm-gcc/bin/../lib/gcc
-L/home/vadve/lattner/local/x86/llvm-gcc//lib/gcc/i686-pc-linux-gnu/3.4-llvm
-L/home/vadve/lattner/local/x86/llvm-gcc/bin/../lib/gcc/i686-pc-linux-gnu/3.4-llvm/../../..
-L/home/vadve/lattner/local/x86/llvm-gcc//lib/gcc/i686-pc-linux-gnu/3.4-llvm/../../..
test.bc -lstdc++ -lc crtend.o

gccld: error linking in 'c': Function 'int (sbyte *)':"puts" - Function is
already defined!
gccld: /home/vadve/criswell/llvm/include/Support/Casting.h:194: typename
cast_retty<To, From>::ret_type cast(const Y&) [with X = Function, Y = Value*]:
Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
Abort (core dumped)

; GNU C++ version 3.4-llvm 20030827 (experimental) (i686-pc-linux-gnu)
;   compiled by GNU C version 3.3.
; GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64209
; options passed:  -iprefix -D_GNU_SOURCE -mtune=pentiumpro -auxbase
; options enabled:  -feliminate-unused-debug-types -fpeephole
; -ffunction-cse -fkeep-static-consts -fpcc-struct-return -fgcse-lm
; -fgcse-sm -fsched-interblock -fsched-spec -fbranch-count-reg -fcommon
; -fgnu-linker -fargument-alias -fzero-initialized-in-bss -fident
; -fmath-errno -ftrapping-math -m80387 -mhard-float -mno-soft-float
; -mieee-fp -mfp-ret-in-387 -maccumulate-outgoing-args -mno-red-zone
; -mtls-direct-seg-refs -mtune=pentiumpro -march=i386

target pointersize = 32
target endian = little
"complex double" = type { double, double }
"complex float" = type { float, float }
"complex long double" = type { double, double }
%f = global int (int)* %_Z8functioni  ;; int (*f)(int)


implementation

int %_Z8functioni(int %x.1) {  ;; int function(int)
entry:
    %x.0 = alloca int        ; ty=int*
    %result = alloca int         ; ty=int*
    store int %x.1, int* %x.0
    store int 5, int* %result
    br label %return
after_ret:
    br label %return
return:
    %tmp = load int* %result         ; ty=int
    ret int %tmp
}


int %main(int %argc.1, sbyte** %argv.1) {  ;; int main(int, char**)
entry:
    %argc.0 = alloca int         ; ty=int*
    %argv.0 = alloca sbyte**         ; ty=sbyte***
    %result = alloca int         ; ty=int*
    store int %argc.1, int* %argc.0
    store sbyte** %argv.1, sbyte*** %argv.0
    call void ()* %__main()
    %tmp.0 = load int (int)** %f         ; ty=int (int)*
    %tmp.1 = call int (int)* %tmp.0(int 1)       ; ty=int
    store int 0, int* %result
    br label %return
after_ret:
    br label %return
return:
    %tmp.2 = load int* %result       ; ty=int
    ret int %tmp.2
}

declare void %__main()
;; Created by "GCC: (GNU) 3.4-llvm 20030827 (experimental)"



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the llvm-bugs mailing list