[llvm-bugs] [Bug 26378] New: Assert failure with -compile-twice

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jan 29 13:51:13 PST 2016


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

            Bug ID: 26378
           Summary: Assert failure with -compile-twice
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: PowerPC
          Assignee: unassignedbugs at nondot.org
          Reporter: kbarton at ca.ibm.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 15756
  --> https://llvm.org/bugs/attachment.cgi?id=15756&action=edit
Failing test case

The attached test case generates the following assertion when compiled with
-compile-twice:

llc -compile-twice -filetype obj x.ll
llc: /home/kbarton/llvm/src/dev.git/include/llvm/Support/Casting.h:237:
typename llvm::cast_retty<X, Y*>::ret_type llvm::cast(Y*) [with X =
llvm::MCSymbolELF; Y = llvm::MCSymbol; typename llvm::cast_retty<X,
Y*>::ret_type = llvm::MCSymbolELF*]: Assertion `isa<X>(Val) && "cast<Ty>()
argument of incompatible type!"' failed.
#0 0x0000000012a8ed20 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/kbarton/llvm/src/dev.git/lib/Support/Unix/Signals.inc:322:0
#1 0x0000000012a8f110 PrintStackTraceSignalHandler(void*)
/home/kbarton/llvm/src/dev.git/lib/Support/Unix/Signals.inc:379:0
#2 0x0000000012a8d1f8 llvm::sys::RunSignalHandlers()
/home/kbarton/llvm/src/dev.git/lib/Support/Signals.cpp:45:0
#3 0x0000000012a8e5d0 SignalHandler(int)
/home/kbarton/llvm/src/dev.git/lib/Support/Unix/Signals.inc:200:0
#4 0x00003fffb62e0478  0x100478 gsignal
#5 0x00003fffb62e0478
/build/buildd/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#6 0x00003fffb62e0478 abort /build/buildd/eglibc-2.19/stdlib/abort.c:74:0
#7 0x00003fffb5d50a88 __assert_fail_base
/build/buildd/eglibc-2.19/assert/assert.c:92:0
#8 0x00003fffb5d5693c __assert_fail
/build/buildd/eglibc-2.19/assert/assert.c:101:0
#9 0x00003fffb5d465b4 llvm::cast_retty<llvm::MCSymbolELF,
llvm::MCSymbol*>::ret_type llvm::cast<llvm::MCSymbolELF,
llvm::MCSymbol>(llvm::MCSymbol*)
/home/kbarton/llvm/src/dev.git/include/llvm/Support/Casting.h:237:0
#10 0x00003fffb5d466a4 llvm::MCELFStreamer::EmitLabel(llvm::MCSymbol*)
/home/kbarton/llvm/src/dev.git/lib/MC/MCELFStreamer.cpp:98:0
#11 0x0000000010c4eaf4 (anonymous
namespace)::PPCLinuxAsmPrinter::doFinalization(llvm::Module&)
/home/kbarton/llvm/src/dev.git/lib/Target/PowerPC/PPCAsmPrinter.cpp:1161:0
#12 0x000000001259b364 llvm::FPPassManager::doFinalization(llvm::Module&)
/home/kbarton/llvm/src/dev.git/lib/IR/LegacyPassManager.cpp:1589:0
#13 0x0000000011524e10 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/home/kbarton/llvm/src/dev.git/lib/IR/LegacyPassManager.cpp:1645:0
#14 0x0000000012460790 llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/kbarton/llvm/src/dev.git/lib/IR/LegacyPassManager.cpp:1730:0
#15 0x0000000012460d5c llvm::legacy::PassManager::run(llvm::Module&)
/home/kbarton/llvm/src/dev.git/lib/IR/LegacyPassManager.cpp:1761:0
#16 0x000000001246148c compileModule(char**, llvm::LLVMContext&)
/home/kbarton/llvm/src/dev.git/tools/llc/llc.cpp:405:0
#17 0x0000000012461868 main
/home/kbarton/llvm/src/dev.git/tools/llc/llc.cpp:211:0
#18 0x00000000109600f8 generic_start_main
/build/buildd/eglibc-2.19/csu/../csu/libc-start.c:287:0
#19 0x000000001095ec94 __libc_start_main
/build/buildd/eglibc-2.19/csu/../sysdeps/unix/sysv/linux/powerpc/libc-start.c:93:0
0  llc       0x0000000012a8ed20 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
+ 68
1  llc       0x0000000012a8f110
2  llc       0x0000000012a8d1f8 llvm::sys::RunSignalHandlers() + 180
3  llc       0x0000000012a8e5d0
4            0x00003fffb62e0478 __kernel_sigtramp_rt64 + 0
5  libc.so.6 0x00003fffb5d50a88 gsignal + 72
6  libc.so.6 0x00003fffb5d5693c abort + 620
7  libc.so.6 0x00003fffb5d465b4
8  libc.so.6 0x00003fffb5d466a4 __assert_fail + 100
9  llc       0x0000000010c4eaf4
10 llc       0x000000001259b364 llvm::MCELFStreamer::EmitLabel(llvm::MCSymbol*)
+ 44
11 llc       0x0000000011524e10
12 llc       0x0000000012460790
llvm::FPPassManager::doFinalization(llvm::Module&) + 140
13 llc       0x0000000012460d5c
14 llc       0x000000001246148c
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 356
15 llc       0x0000000012461868 llvm::legacy::PassManager::run(llvm::Module&) +
56
16 llc       0x00000000109600f8
17 llc       0x000000001095ec94 main + 296
18 libc.so.6 0x00003fffb5d34d00
19 libc.so.6 0x00003fffb5d34ef8 __libc_start_main + 200
Stack dump:
0.      Program arguments: llc -compile-twice -filetype obj x.ll
[1]    48243 abort (core dumped)  llc -compile-twice -filetype obj x.ll


llc version: 
LLVM (http://llvm.org/):
  LLVM version 3.9.0svn
  DEBUG build with assertions.
  Built Jan 20 2016 (13:48:39).
  Default target: powerpc64le-unknown-linux-gnu
  Host CPU: pwr8

-- 
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/20160129/1ab1b911/attachment-0001.html>


More information about the llvm-bugs mailing list