[LLVMbugs] [Bug 7878] New: Relocation error. Absolute 0 assumed
    bugzilla-daemon at llvm.org 
    bugzilla-daemon at llvm.org
       
    Thu Aug 12 15:03:23 PDT 2010
    
    
  
http://llvm.org/bugs/show_bug.cgi?id=7878
           Summary: Relocation error. Absolute 0 assumed
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: wendling at apple.com
                CC: llvmbugs at cs.uiuc.edu
With this testcase:
$ cat t.ll
target triple = "x86_64-apple-darwin10.4"
@ar.1462 = internal constant [2 x i16] [i16 0, i16 sub (i16 ptrtoint (i8*
blockaddress(@foo, %l2) to i16), i16 ptrtoint (i8* blockaddres\
s(@foo, %bb) to i16))] ; <[2 x i16]*> [#uses=1]
define i32 @foo(i32 %a) nounwind readnone optsize ssp {
entry:
  %0 = sext i32 %a to i64                         ; <i64> [#uses=1]
  %1 = getelementptr inbounds [2 x i16]* @ar.1462, i64 0, i64 %0 ; <i16*>
[#uses=1]
  %2 = load i16* %1, align 2                      ; <i16> [#uses=1]
  %3 = sext i16 %2 to i64                         ; <i64> [#uses=1]
  %4 = getelementptr inbounds i8* blockaddress(@foo, %bb), i64 %3 ; <i8*>
[#uses=1]
  indirectbr i8* %4, [label %bb, label %l2]
l2:                                               ; preds = %entry
  ret i32 2
bb:                                               ; preds = %entry
  ret i32 1
}
If you code-gen it and compile, you'll get this error:
$ llc -o t.s t.ll
$ gcc t.s
t.s:24:Relocation error. Absolute 0 assumed
t.s:24:Relocation error. Absolute 0 assumed

-- 
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