[LLVMbugs] [Bug 13195] New: Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/home/rdivacky/llvm/include/llvm/Support/Casting.h, line 194.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jun 25 01:02:15 PDT 2012


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

             Bug #: 13195
           Summary: Assertion failed: (isa<X>(Val) && "cast<Ty>() argument
                    of incompatible type!"), function cast, file
                    /usr/home/rdivacky/llvm/include/llvm/Support/Casting.h
                    , line 194.
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rdivacky at freebsd.org
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


pes ~/whirl$ cat JSWebKitPointCustom.cpp
namespace std
{
template < typename __T > void isnan (__T)
{
    __builtin_isnan;
}
}
using
std::isnan;
void
constructJSWebKitPoint ()
{
    isnan (0);
}
pes ~/whirl$ clang++ JSWebKitPointCustom.cpp
JSWebKitPointCustom.cpp:5:5: warning: expression result unused [-Wunused-value]
    __builtin_isnan;
    ^~~~~~~~~~~~~~~
Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"),
function cast, file /usr/home/rdivacky/llvm/include/llvm/Support/Casting.h,
line 194.
Stack dump:
0.      Program arguments: /usr/local/bin/clang -cc1 -triple
x86_64-unknown-freebsd8.2 -emit-obj -mrelax-all -disable-free -main-file-name
JSWebKitPointCustom.cpp -mrelocation-model static -mdisable-fp-elim
-masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64
-target-linker-version 2.15 -momit-leaf-frame-pointer -resource-dir
/usr/local/bin/../lib/clang/3.2 -fmodule-cache-path /var/tmp/clang-module-cache
-fdeprecated-macro -fdebug-compilation-dir /home/rdivacky/whirl -ferror-limit
19 -fmessage-length 116 -mstackrealign -fobjc-runtime=gnu
-fobjc-dispatch-method=non-legacy -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/JSWebKitPointCustom-KHMDNS.o -x c++ JSWebKitPointCustom.cpp 
1.      <eof> parser at end of file
2.      Per-file LLVM IR generation
3.      JSWebKitPointCustom.cpp:3:32: Generating code for declaration
'std::isnan'
4.      JSWebKitPointCustom.cpp:4:1: LLVM IR generation of compound statement
('{}')
5.      JSWebKitPointCustom.cpp:5:5: Mangling declaration '__builtin_isnan'
clang: error: unable to execute command: Abort trap: 6 (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.2 (trunk 159128)
Target: x86_64-unknown-freebsd8.2
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/JSWebKitPointCustom-jzzznl.ii
clang: note: diagnostic msg: /tmp/JSWebKitPointCustom-jzzznl.sh
clang: note: diagnostic msg: 

********************

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