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

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Aug 6 11:34:49 PDT 2012


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

             Bug #: 13538
           Summary: Assertion `isa<X>(Val) && "cast<Ty>() argument of
                    incompatible type!"' failed
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: ps at kr.tuwien.ac.at
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 9007
  --> http://llvm.org/bugs/attachment.cgi?id=9007
auxiliary files produced by the assertion (preprocessed input)

(creating new issue as instructed by Eli Friedman in issue 13195)

This assertion is triggered with the following output

/bin/bash ../libtool --tag=CXX   --mode=compile
/var/lib/buildbot/instdirs//clang-trunk/bin/clang++ -DHAVE_CONFIG_H -I. 
-I../include -I../mpcompiler/include
-I/var/lib/buildbot/instdirs/dlvhex-1x-boost-1_48-clang-trunk/include  
-I/var/lib/buildbot/instdirs/boost-1_48/include 
-DSYS_PLUGIN_DIR='"/var/lib/buildbot/instdirs/dlvhex-1x-boost-1_48-clang-trunk/lib/dlvhex/plugins"'
-DUSER_PLUGIN_DIR='".dlvhex/plugins"'  -g -O2 -MT OpDalal.lo -MD -MP -MF
.deps/OpDalal.Tpo -c -o OpDalal.lo OpDalal.cpp
libtool: compile:  /var/lib/buildbot/instdirs//clang-trunk/bin/clang++
-DHAVE_CONFIG_H -I. -I../include -I../mpcompiler/include
-I/var/lib/buildbot/instdirs/dlvhex-1x-boost-1_48-clang-trunk/include
-I/var/lib/buildbot/instdirs/boost-1_48/include
-DSYS_PLUGIN_DIR=\"/var/lib/buildbot/instdirs/dlvhex-1x-boost-1_48-clang-trunk/lib/dlvhex/plugins\"
-DUSER_PLUGIN_DIR=\".dlvhex/plugins\" -g -O2 -MT OpDalal.lo -MD -MP -MF
.deps/OpDalal.Tpo -c OpDalal.cpp  -fPIC -DPIC -o .libs/OpDalal.o
clang:
/var/lib/buildbot/clang-slave/trunk/build/include/llvm/Support/Casting.h:194:
typename llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X =
clang::CXXConstructorDecl, Y = clang::NamedDecl*, typename llvm::cast_retty<To,
From>::ret_type = clang::CXXConstructorDecl*]: Assertion `isa<X>(Val) &&
"cast<Ty>() argument of incompatible type!"' failed.
0  clang           0x0000000001ca966f
1  clang           0x0000000001caa192
2  libpthread.so.0 0x00002ab09cce3060
3  libc.so.6       0x00002ab09d8cd3a5 gsignal + 53
4  libc.so.6       0x00002ab09d8d0b0b abort + 379
5  libc.so.6       0x00002ab09d8c5d4d __assert_fail + 221
6  clang           0x0000000000b4c3cc
7  clang           0x0000000000b50d71
clang::InitializationSequence::InitializationSequence(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
clang::Expr**, unsigned int) + 2305
8  clang           0x0000000000b12972
9  clang           0x0000000000b17b55
clang::Sema::BuildBinaryTypeTrait(clang::BinaryTypeTrait,
clang::SourceLocation, clang::TypeSourceInfo*, clang::TypeSourceInfo*,
clang::SourceLocation) + 789
10 clang           0x0000000000c4dbd8
11 clang           0x0000000000c60dc9
12 clang           0x0000000000c4db65
13 clang           0x0000000000c6880d
14 clang           0x0000000000c4e5c8
15 clang           0x0000000000c48c55
16 clang           0x0000000000c4a858
17 clang           0x0000000000c4b118
18 clang           0x0000000000c50ad8
19 clang           0x0000000000c5e96b
20 clang           0x0000000000c51691
21 clang           0x0000000000c5324b
22 clang           0x0000000000c54afe
clang::Sema::SubstType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName) + 158
23 clang           0x0000000000c54e77
clang::Sema::SubstBaseSpecifiers(clang::CXXRecordDecl*, clang::CXXRecordDecl*,
clang::MultiLevelTemplateArgumentList const&) + 743
24 clang           0x0000000000c5536c
clang::Sema::InstantiateClass(clang::SourceLocation, clang::CXXRecordDecl*,
clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind, bool) + 588
25 clang           0x0000000000c5692f
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) + 1119
26 clang           0x0000000000c9d5a4
clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser&) + 1348
27 clang           0x00000000009ab549
clang::Sema::RequireCompleteDeclContext(clang::CXXScopeSpec&,
clang::DeclContext*) + 329
28 clang           0x0000000000aeee87
clang::Sema::BuildQualifiedDeclarationNameExpr(clang::CXXScopeSpec&,
clang::DeclarationNameInfo const&) + 87
29 clang           0x0000000000c5e091
30 clang           0x0000000000c4e6ae
31 clang           0x0000000000c64070
32 clang           0x0000000000c4ee61
33 clang           0x0000000000c48c55
34 clang           0x0000000000c4a858
35 clang           0x0000000000c4b118
36 clang           0x0000000000c50ad8
37 clang           0x0000000000c5324b
38 clang           0x0000000000c54afe
clang::Sema::SubstType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName) + 158
39 clang           0x0000000000c745f9
clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(clang::TypedefNameDecl*,
bool) + 265
40 clang           0x0000000000c74888
clang::TemplateDeclInstantiator::VisitTypedefDecl(clang::TypedefDecl*) + 24
41 clang           0x0000000000c554df
clang::Sema::InstantiateClass(clang::SourceLocation, clang::CXXRecordDecl*,
clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind, bool) + 959
42 clang           0x0000000000c5692f
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) + 1119
43 clang           0x0000000000c9d5a4
clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser&) + 1348
44 clang           0x00000000009ab549
clang::Sema::RequireCompleteDeclContext(clang::CXXScopeSpec&,
clang::DeclContext*) + 329
45 clang           0x0000000000bd9f2a
clang::Sema::CheckTypenameType(clang::ElaboratedTypeKeyword,
clang::SourceLocation, clang::NestedNameSpecifierLoc, clang::IdentifierInfo
const&, clang::SourceLocation) + 202
46 clang           0x0000000000c5d2da
47 clang           0x0000000000c50a15
48 clang           0x0000000000c5324b
49 clang           0x0000000000c54afe
clang::Sema::SubstType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName) + 158
50 clang           0x0000000000c745f9
clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(clang::TypedefNameDecl*,
bool) + 265
51 clang           0x0000000000c74888
clang::TemplateDeclInstantiator::VisitTypedefDecl(clang::TypedefDecl*) + 24
52 clang           0x0000000000c554df
clang::Sema::InstantiateClass(clang::SourceLocation, clang::CXXRecordDecl*,
clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind, bool) + 959
53 clang           0x0000000000c5692f
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) + 1119
54 clang           0x0000000000c9d5a4
clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser&) + 1348
55 clang           0x0000000000a7d154
clang::Sema::CheckBaseSpecifier(clang::CXXRecordDecl*, clang::SourceRange,
bool, clang::AccessSpecifier, clang::TypeSourceInfo*, clang::SourceLocation) +
308
56 clang           0x0000000000c54eb3
clang::Sema::SubstBaseSpecifiers(clang::CXXRecordDecl*, clang::CXXRecordDecl*,
clang::MultiLevelTemplateArgumentList const&) + 803
57 clang           0x0000000000c5536c
clang::Sema::InstantiateClass(clang::SourceLocation, clang::CXXRecordDecl*,
clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind, bool) + 588
58 clang           0x0000000000c5692f
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) + 1119
59 clang           0x0000000000c9d5a4
clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser&) + 1348
60 clang           0x00000000009ab549
clang::Sema::RequireCompleteDeclContext(clang::CXXScopeSpec&,
clang::DeclContext*) + 329
61 clang           0x0000000000bd9f2a
clang::Sema::CheckTypenameType(clang::ElaboratedTypeKeyword,
clang::SourceLocation, clang::NestedNameSpecifierLoc, clang::IdentifierInfo
const&, clang::SourceLocation) + 202
62 clang           0x0000000000c5d2da
63 clang           0x0000000000c50a15
64 clang           0x0000000000c5324b
65 clang           0x0000000000c54afe
clang::Sema::SubstType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName) + 158
66 clang           0x0000000000c745f9
clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(clang::TypedefNameDecl*,
bool) + 265
67 clang           0x0000000000c74888
clang::TemplateDeclInstantiator::VisitTypedefDecl(clang::TypedefDecl*) + 24
68 clang           0x0000000000c554df
clang::Sema::InstantiateClass(clang::SourceLocation, clang::CXXRecordDecl*,
clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind, bool) + 959
69 clang           0x0000000000c5692f
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) + 1119
70 clang           0x0000000000c9d5a4
clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser&) + 1348
71 clang           0x0000000000a7d154
clang::Sema::CheckBaseSpecifier(clang::CXXRecordDecl*, clang::SourceRange,
bool, clang::AccessSpecifier, clang::TypeSourceInfo*, clang::SourceLocation) +
308
72 clang           0x0000000000c54eb3
clang::Sema::SubstBaseSpecifiers(clang::CXXRecordDecl*, clang::CXXRecordDecl*,
clang::MultiLevelTemplateArgumentList const&) + 803
73 clang           0x0000000000c5536c
clang::Sema::InstantiateClass(clang::SourceLocation, clang::CXXRecordDecl*,
clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind, bool) + 588
74 clang           0x0000000000c5692f
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) + 1119
75 clang           0x0000000000c9d5a4
clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser&) + 1348
76 clang           0x0000000000aba520
clang::Sema::CheckCallReturnType(clang::QualType, clang::SourceLocation,
clang::CallExpr*, clang::FunctionDecl*) + 224
77 clang           0x0000000000af17b6
clang::Sema::BuildResolvedCallExpr(clang::Expr*, clang::NamedDecl*,
clang::SourceLocation, clang::Expr**, unsigned int, clang::SourceLocation,
clang::Expr*, bool) + 646
78 clang           0x0000000000ba3b89
clang::Sema::BuildOverloadedCallExpr(clang::Scope*, clang::Expr*,
clang::UnresolvedLookupExpr*, clang::SourceLocation, clang::Expr**, unsigned
int, clang::SourceLocation, clang::Expr*, bool) + 777
79 clang           0x0000000000af2844 clang::Sema::ActOnCallExpr(clang::Scope*,
clang::Expr*, clang::SourceLocation, clang::ASTMultiPtr<clang::Expr*>,
clang::SourceLocation, clang::Expr*, bool) + 1412
80 clang           0x0000000000c6328d
81 clang           0x0000000000c63302
82 clang           0x0000000000c4eaba
83 clang           0x0000000000c68c9f clang::Sema::SubstExpr(clang::Expr*,
clang::MultiLevelTemplateArgumentList const&) + 79
84 clang           0x0000000000c72b1a
clang::Sema::SubstInitializer(clang::Expr*,
clang::MultiLevelTemplateArgumentList const&, bool) + 90
85 clang           0x0000000000c7c3e5
clang::TemplateDeclInstantiator::VisitVarDecl(clang::VarDecl*) + 1957
86 clang           0x0000000000c75988 clang::Sema::SubstDecl(clang::Decl*,
clang::DeclContext*, clang::MultiLevelTemplateArgumentList const&) + 136
87 clang           0x0000000000c695df
88 clang           0x0000000000c6ad2f
89 clang           0x0000000000c69238
90 clang           0x0000000000c6bb8f clang::Sema::SubstStmt(clang::Stmt*,
clang::MultiLevelTemplateArgumentList const&) + 79
91 clang           0x0000000000c7ddea
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 858
92 clang           0x0000000000c7d7cd
clang::Sema::PerformPendingInstantiations(bool) + 509
93 clang           0x0000000000c7de9a
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 1034
94 clang           0x0000000000c7d7cd
clang::Sema::PerformPendingInstantiations(bool) + 509
95 clang           0x00000000009931c0 clang::Sema::ActOnEndOfTranslationUnit()
+ 384
96 clang           0x00000000008fe006
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 406
97 clang           0x00000000008f268d clang::ParseAST(clang::Sema&, bool, bool)
+ 445
98 clang           0x0000000000783d54 clang::CodeGenAction::ExecuteAction() +
68
99 clang           0x000000000062d69f clang::FrontendAction::Execute() + 143
100 clang           0x000000000060eb74
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 340
101 clang           0x00000000005f3238
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1240
102 clang           0x00000000005e8b49 cc1_main(char const**, char const**,
char const*, void*) + 6873
103 clang           0x00000000005f2058 main + 7528
104 libc.so.6       0x00002ab09d8b830d __libc_start_main + 237
105 clang           0x00000000005e6469
Stack dump:
0.    Program arguments: /var/lib/buildbot/instdirs/clang-trunk/bin/clang -cc1
-triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
OpDalal.cpp -pic-level 2 -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -target-linker-version 2.21.53.20110810
-momit-leaf-frame-pointer -g -coverage-file .libs/OpDalal.o -resource-dir
/var/lib/buildbot/instdirs/clang-trunk/bin/../lib/clang/3.2 -dependency-file
.deps/OpDalal.Tpo -sys-header-deps -MP -MT OpDalal.lo -D HAVE_CONFIG_H -D
SYS_PLUGIN_DIR="/var/lib/buildbot/instdirs/dlvhex-1x-boost-1_48-clang-trunk/lib/dlvhex/plugins"
-D USER_PLUGIN_DIR=".dlvhex/plugins" -D PIC -I . -I ../include -I
../mpcompiler/include -I
/var/lib/buildbot/instdirs/dlvhex-1x-boost-1_48-clang-trunk/include -I
/var/lib/buildbot/instdirs/boost-1_48/include -fmodule-cache-path
/var/tmp/clang-module-cache -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/x86_64-linux-gnu
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/backward
-internal-isystem /usr/local/include -internal-isystem
/var/lib/buildbot/instdirs/clang-trunk/bin/../lib/clang/3.2/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O2
-fdeprecated-macro -fdebug-compilation-dir
/var/lib/buildbot/dlvhex-slave/plugin-merging-dlvhex-1x-boost-1_48-clang-trunk/build/src
-ferror-limit 19 -fmessage-length 0 -mstackrealign -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -o .libs/OpDalal.o -x
c++ OpDalal.cpp 
1.    <eof> parser at end of file
2.   
/var/lib/buildbot/instdirs/boost-1_48/include/boost/algorithm/string/split.hpp:140:35:
instantiating function definition 'split'
3.   
/var/lib/buildbot/instdirs/boost-1_48/include/boost/algorithm/string/iter_find.hpp:143:9:
instantiating function definition 'iter_split'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.2 (trunk 161314)
Target: x86_64-unknown-linux-gnu
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/OpDalal-vfhTW1.cpp
clang: note: diagnostic msg: /tmp/OpDalal-vfhTW1.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