[LLVMbugs] [Bug 2858] New: CBE: error: conflicting types for ‘_longjmp’

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Oct 4 03:03:52 PDT 2008


http://llvm.org/bugs/show_bug.cgi?id=2858

           Summary: CBE: error: conflicting types for ‘_longjmp’
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Try to compile the following with SVN r57045:

$ cat foo.c
#include <setjmp.h>
jmp_buf buf;
int foo()
{
        _longjmp(buf, 1);
        return 0;
}
$ llvm-gcc foo.c -c -o foo.bc -emit-llvm
$ llc -march=c foo.bc -o foo.cbe.c
$ gcc foo.cbe.c -c
foo.cbe.c:149: error: conflicting types for ‘_longjmp’
/usr/include/setjmp.h:91: error: previous declaration of ‘_longjmp’ was
here
foo.cbe.c:150: warning: conflicting types for built-in function ‘malloc’

Bugpoint reduced bitcode:
; ModuleID = 'bugpoint-reduced-simplified.bc'
target datalayout =
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
target triple = "x86_64-unknown-linux-gnu"
        %struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
        %struct.__sigset_t = type { [16 x i64] }
@buf = common global [1 x %struct.__jmp_buf_tag] zeroinitializer, align 32     
        ; <[1 x %struct.__jmp_buf_tag]*> [#uses=1]

define i32 @foo() nounwind {
entry:
        %retval = alloca i32            ; <i32*> [#uses=1]
        %0 = alloca i32         ; <i32*> [#uses=0]
        %"alloca point" = bitcast i32 0 to i32          ; <i32> [#uses=0]
        call void @_longjmp(%struct.__jmp_buf_tag* getelementptr ([1 x
%struct.__jmp_buf_tag]* @buf, i32 0, i32 0), i32 1) noreturn nounwind
        unreachable

return:         ; No predecessors!
        %retval1 = load i32* %retval            ; <i32> [#uses=1]
        ret i32 %retval1
}


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list