[LLVMbugs] [Bug 22217] New: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jan 13 11:40:50 PST 2015


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

            Bug ID: 22217
           Summary: Assertion `isa<X>(Val) && "cast<Ty>() argument of
                    incompatible type!"' failed.
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: kcc at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This is clang r225817
Reproducer reduced from glibc sources by creduce
=========================
 int __vdso_clock_gettime;
    extern __typeof ( &__vdso_clock_gettime )      __EI___vdso_clock_gettime
__asm__ ( "__vdso_clock_gettime" );
    __typeof ( &__vdso_clock_gettime )      __EI___vdso_clock_gettime       
__attribute__ ( ( alias ( "__GI___vdso_clock_gettime" ) ) );
=========================

clang -cc1 -triple x86_64-unknown-linux-gnu -S  b.c -o /dev/null 

b.c:3:10: warning: typedef requires a name
         typedef union 
         ^~~~~~~
b.c:4:40: warning: attribute '__transparent_union__' is ignored, place it after
"union" to apply attribute to type declaration
        __SOCKADDR_ARG __attribute__ ((__transparent_union__));
                                       ^
clang: llvm/include/llvm/Support/Casting.h:237: typename cast_retty<X, Y
*>::ret_type llvm::cast(Y *) [X = llvm::GlobalAlias, Y = llvm::GlobalValue]:
Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
#0 0x14df5a8 llvm::sys::PrintStackTrace(_IO_FILE*)
(llvm_build/bin/clang-3.6+0x14df5a8)
#1 0x14e0b5b SignalHandler(int) (llvm_build/bin/clang-3.6+0x14e0b5b)
#2 0x7fadc5b7d340 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10340)
#3 0x7fadc4da6bb9 gsignal
/build/buildd/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#4 0x7fadc4da9fc8 abort /build/buildd/eglibc-2.19/stdlib/abort.c:91:0
#5 0x7fadc4d9fa76 __assert_fail_base
/build/buildd/eglibc-2.19/assert/assert.c:92:0
#6 0x7fadc4d9fb22 (/lib/x86_64-linux-gnu/libc.so.6+0x2fb22)
#7 0x1989fd1 clang::CodeGen::CodeGenModule::checkAliases()
(llvm_build/bin/clang-3.6+0x1989fd1)
#8 0x198a8d6 clang::CodeGen::CodeGenModule::Release()
(llvm_build/bin/clang-3.6+0x198a8d6)
#9 0x1927b20 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(llvm_build/bin/clang-3.6+0x1927b20)
#10 0x1ebf183 clang::ParseAST(clang::Sema&, bool, bool)
(llvm_build/bin/clang-3.6+0x1ebf183)
#11 0x168bfee clang::FrontendAction::Execute()
(llvm_build/bin/clang-3.6+0x168bfee)
#12 0x165cf3c clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(llvm_build/bin/clang-3.6+0x165cf3c)
#13 0x171025a clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(llvm_build/bin/clang-3.6+0x171025a)
#14 0x6cf9b4 cc1_main(llvm::ArrayRef<char const*>, char const*, void*)
(llvm_build/bin/clang-3.6+0x6cf9b4)
#15 0x6ce6f8 main (llvm_build/bin/clang-3.6+0x6ce6f8)

-- 
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/20150113/65e66ff4/attachment.html>


More information about the llvm-bugs mailing list