[LLVMbugs] [Bug 21005] New: Assertion error "isa<X>(Val) && "cast<Ty>() argument of incompatible type!" when compling for target i686-pc-windows-msvc with -g

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Sep 19 12:23:41 PDT 2014


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

            Bug ID: 21005
           Summary: Assertion error "isa<X>(Val) && "cast<Ty>() argument
                    of incompatible type!" when compling for target
                    i686-pc-windows-msvc with -g
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: felixhaedicke at web.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 13053
  --> http://llvm.org/bugs/attachment.cgi?id=13053&action=edit
Preprocessed sample code (gzip compressed)

I am compiling C++ code with the clang target "i686-pc-windows-msvc" and the
SDK from VS 2013. When compiling with the arguments "-g" and "-D_DLL", I get an
assertion error for most of my code files. Without -g or without -g, the code
is compiled successfully.

It is reproducible with the attached preprocessed code and the following
commmand line:

clang++ -target i686-pc-windows-msvc Deserialiser.i -c -g -o Deserialiser.o

The assertion message below is generated by Clang 3.5.0 from the official Win32
installer. I have also built a Cygwin version of Clang 3.5.0 (the attached
preprocessed source is generated with the Cygwin build), and I am getting
another message.


Error message from Clang 3.5.0 from the official Win32 installer:

Assertion failed: isa<X>(Val) && "cast<Ty>() argument of incompatible type!",
file D:\src\llvm_release_build_3.5.0\llvm\include\llvm/Support/Casting.h, line
237
clang++.exe: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.5.0 (217039)
Target: i686-pc-windows-msvc
Thread model: posix
clang++.exe: 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++.exe: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.


Error message from Clang 3.5.0 built for Cygwin:

Stack dump:
0.      Program arguments: /opt/llvm/3.5/bin/clang-3.5 -cc1 -triple
i686-pc-windows-msvc -emit-obj -mrelax-all -disable-free -disable-llvm-verifier
-main-file-name Deserialiser.i -mrelocation-model static -mdisable-fp-elim
-fmath-errno -masm-verbose -mconstructor-aliases -target-cpu pentium4 -g
-dwarf-column-info -coverage-file
/cygdrive/c/Users/felix/Documents/Sources/xcsoar/Deserialiser.o -resource-dir
/opt/llvm/3.5/bin/../lib/clang/3.5.0 -std=c++11 -fdeprecated-macro
-fdebug-compilation-dir /cygdrive/c/Users/felix/Documents/Sources/xcsoar
-ferror-limit 19 -fmessage-length 179 -mstackrealign -fms-extensions
-fms-compatibility -fms-compatibility-version=17.00 -fdelayed-template-parsing
-fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -o Deserialiser.o -x c++-cpp-output Deserialiser.i
1.      src/Task/Deserialiser.cpp:113:1: current parser token
'ObservationZonePoint'
2.      src/Task/Deserialiser.cpp:40:15: LLVM IR generation of declaration
'Deserialiser::DeserialiseTaskpoint'
3.      src/Task/Deserialiser.cpp:40:15: Generating code for declaration
'Deserialiser::DeserialiseTaskpoint'

-- 
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/20140919/5f6c13b5/attachment.html>


More information about the llvm-bugs mailing list