[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


           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
foo.cbe.c:150: warning: conflicting types for built-in function ‘malloc’

Bugpoint reduced bitcode:
; ModuleID = 'bugpoint-reduced-simplified.bc'
target datalayout =
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 {
        %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

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