[llvm-bugs] [Bug 25912] New: llc assertion failure with COFF target

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Dec 21 13:59:15 PST 2015


https://llvm.org/bugs/show_bug.cgi?id=25912

            Bug ID: 25912
           Summary: llc assertion failure with COFF target
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: davidxl at google.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

pass the following simple ll file to llc, llc will assert. I have not looked at
in in details.

; ModuleID = '<stdin>'
 target datalayout = "e-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-win64-coff"


@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void
()*, i8* } { i32 0, void ()* @__llvm_profile_init, i8* null }]

; Function Attrs: noinline
define internal void @__llvm_profile_init() unnamed_addr #1 {
  ret void
}

attributes #0 = { nounwind }


The assertion failure is:

llc: /usr/local/google/davidxl/dev/llvm/include/llvm/Support/Casting.h:237:
typename cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = llvm::MCSectionCOFF,
Y = llvm::MCSection]: Assertion `isa<X>(Val) && "cast<Ty>() argument of
incompatible type!"' failed.
0  llc             0x0000000000670b41 backtrace + 65
1  llc             0x0000000003ccd4c1
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 241
2  llc             0x0000000003cce9f4
3  libpthread.so.0 0x00007f379b9e3330
4  libc.so.6       0x00007f379ac0bcb7 gsignal + 55
5  libc.so.6       0x00007f379ac0f0a8 abort + 328
6  libc.so.6       0x00007f379ac04b76
7  libc.so.6       0x00007f379ac04c22
8  llc             0x0000000002cc7eb4
9  llc             0x0000000002634513
llvm::AsmPrinter::EmitXXStructorList(llvm::DataLayout const&, llvm::Constant
const*, bool) + 3523
10 llc             0x000000000261d26e
llvm::AsmPrinter::EmitSpecialLLVMGlobal(llvm::GlobalVariable const*) + 766

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151221/72a7a5a9/attachment.html>


More information about the llvm-bugs mailing list