[LLVMbugs] [Bug 21605] New: Parsing error when including meta.hpp from github.com/ericniebler/range-v3/
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Nov 19 00:27:49 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=21605
Bug ID: 21605
Summary: Parsing error when including meta.hpp from
github.com/ericniebler/range-v3/
Product: clang
Version: trunk
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: release blocker
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: anders at sjogren.info
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
When trying to include Eric Niebler's Ranges library (which is the
implementation of the D4128 Standard library proposal,
https://ericniebler.github.io/std/wg21/D4128.html), a parsing error occurs
using clang 3.6(trunk 216817), while for clang 3.5 (as shipped by Apple) it
works fine.
Repro-steps:
--1--
Get ranges library from
https://github.com/ericniebler/range-v3/tree/25a773c8690c990c6a3ebd654981946953b1f86b
--2--
cd range-v3/include/
--3--
Create test.cpp:
#include "range/v3/utility/meta.hpp"
int main(int argc, const char* argv[]){
return 0;
}
--4--
Try to compile:
clang -I. -std=c++11 test.cpp
Result:
Assertion failed: (Replacement.isCanonical() && "replacement types must always
be canonical"), function getSubstTemplateTypeParmType, file ASTContext.cpp,
line 3047.
0 libLLVM-3.6svn.dylib 0x0000000104c8b71f
llvm::sys::PrintStackTrace(__sFILE*) + 40
1 libLLVM-3.6svn.dylib 0x0000000104c8badf SignalHandler(int) + 205
2 libsystem_platform.dylib 0x00007fff931abf1a _sigtramp + 26
3 libsystem_platform.dylib 0x00007fff6ad96764 _sigtramp + 3619596388
4 libLLVM-3.6svn.dylib 0x0000000104c8b971 abort + 22
5 libLLVM-3.6svn.dylib 0x0000000104c8b95b abort + 0
6 clang 0x000000010331de3a
clang::ASTContext::getSubstTemplateTypeParmPackType(clang::TemplateTypeParmType
const*, clang::TemplateArgument const&) + 0
7 clang 0x0000000102f956d6 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) + 6570
8 clang 0x0000000102f93aa0 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*) + 192
9 clang 0x0000000102f9fe5b clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArgument(clang::TemplateArgumentLoc
const&, clang::TemplateArgumentLoc&) + 119
10 clang 0x0000000102fa1b51 bool
clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArguments<clang::TemplateArgumentLocContainerIterator<clang::DependentTemplateSpecializationTypeLoc>
>(clang::TemplateArgumentLocContainerIterator<clang::DependentTemplateSpecializationTypeLoc>,
clang::TemplateArgumentLocContainerIterator<clang::DependentTemplateSpecializationTypeLoc>,
clang::TemplateArgumentListInfo&) + 829
11 clang 0x0000000102fb2ef6 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDependentTemplateSpecializationType(clang::TypeLocBuilder&,
clang::DependentTemplateSpecializationTypeLoc, clang::NestedNameSpecifierLoc) +
174
12 clang 0x0000000102f95c48 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) + 7964
13 clang 0x0000000102f93aa0 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*) + 192
14 clang 0x0000000102f97238 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::QualType) + 52
15 clang 0x0000000102f9718f
clang::Sema::SubstType(clang::QualType, clang::MultiLevelTemplateArgumentList
const&, clang::SourceLocation, clang::DeclarationName) + 107
16 clang 0x0000000102f33cc7
clang::Sema::CheckTemplateIdType(clang::TemplateName, clang::SourceLocation,
clang::TemplateArgumentListInfo&) + 1669
17 clang 0x0000000102f34d0a
clang::Sema::ActOnTemplateIdType(clang::CXXScopeSpec&, clang::SourceLocation,
clang::OpaquePtr<clang::TemplateName>, clang::SourceLocation,
clang::SourceLocation, llvm::MutableArrayRef<clang::ParsedTemplateArgument>,
clang::SourceLocation, bool) + 594
18 clang 0x0000000102cd4ac5
clang::Parser::AnnotateTemplateIdTokenAsType() + 143
19 clang 0x0000000102c8a8f8
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) + 2632
20 clang 0x0000000102c83dc6
clang::Parser::ParseSpecifierQualifierList(clang::DeclSpec&,
clang::AccessSpecifier, clang::Parser::DeclSpecContext) + 68
21 clang 0x0000000102c83c11
clang::Parser::ParseTypeName(clang::SourceRange*,
clang::Declarator::TheContext, clang::AccessSpecifier, clang::Decl**,
clang::ParsedAttributes*) + 285
22 clang 0x0000000102c9930a
clang::Parser::ParseUsingDeclaration(unsigned int,
clang::Parser::ParsedTemplateInfo const&, clang::SourceLocation,
clang::SourceLocation&, clang::AccessSpecifier, clang::Decl**) + 2254
23 clang 0x0000000102c9ebe7
clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier,
clang::AttributeList*, clang::Parser::ParsedTemplateInfo const&,
clang::ParsingDeclRAIIObject*) + 1823
24 clang 0x0000000102cd1d16
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject&,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 298
25 clang 0x0000000102cd1947
clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 777
26 clang 0x0000000102cd151f
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 95
27 clang 0x0000000102c9e874
clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier,
clang::AttributeList*, clang::Parser::ParsedTemplateInfo const&,
clang::ParsingDeclRAIIObject*) + 940
28 clang 0x0000000102c9d008
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation,
clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int,
clang::Decl*) + 1596
29 clang 0x0000000102c9c54f
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&) + 6053
30 clang 0x0000000102c8a46a
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) + 1466
31 clang 0x0000000102cd1e0e
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject&,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 546
32 clang 0x0000000102cd1947
clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 777
33 clang 0x0000000102cd151f
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 95
34 clang 0x0000000102c89bde
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 392
35 clang 0x0000000102cda0ba
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 1966
36 clang 0x0000000102c981da
clang::Parser::ParseInnerNamespace(std::__1::vector<clang::SourceLocation,
std::__1::allocator<clang::SourceLocation> >&,
std::__1::vector<clang::IdentifierInfo*,
std::__1::allocator<clang::IdentifierInfo*> >&,
std::__1::vector<clang::SourceLocation,
std::__1::allocator<clang::SourceLocation> >&, unsigned int,
clang::SourceLocation&, clang::ParsedAttributes&,
clang::BalancedDelimiterTracker&) + 174
37 clang 0x0000000102c97eb7
clang::Parser::ParseNamespace(unsigned int, clang::SourceLocation&,
clang::SourceLocation) + 3763
38 clang 0x0000000102c89b45
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 239
39 clang 0x0000000102cda12b
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 2079
40 clang 0x0000000102c981da
clang::Parser::ParseInnerNamespace(std::__1::vector<clang::SourceLocation,
std::__1::allocator<clang::SourceLocation> >&,
std::__1::vector<clang::IdentifierInfo*,
std::__1::allocator<clang::IdentifierInfo*> >&,
std::__1::vector<clang::SourceLocation,
std::__1::allocator<clang::SourceLocation> >&, unsigned int,
clang::SourceLocation&, clang::ParsedAttributes&,
clang::BalancedDelimiterTracker&) + 174
41 clang 0x0000000102c97eb7
clang::Parser::ParseNamespace(unsigned int, clang::SourceLocation&,
clang::SourceLocation) + 3763
42 clang 0x0000000102c89b45
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 239
43 clang 0x0000000102cda0ba
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 1966
44 clang 0x0000000102cd98b3
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 329
45 clang 0x0000000102c808ad clang::ParseAST(clang::Sema&,
bool, bool) + 332
46 clang 0x0000000102c1389b
clang::CodeGenAction::ExecuteAction() + 563
47 clang 0x00000001029f5493 clang::FrontendAction::Execute()
+ 67
48 clang 0x00000001029d211a
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 544
49 clang 0x00000001029a23c0
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3912
50 clang 0x000000010299ab0e cc1_main(llvm::ArrayRef<char
const*>, char const*, void*) + 1054
51 clang 0x00000001029a0766 main + 8179
52 libdyld.dylib 0x00007fff870505c9 start + 1
Stack dump:
0. Program arguments: /opt/local/libexec/llvm-3.6/bin/clang -cc1 -triple
x86_64-apple-macosx10.10.0 -emit-obj -mrelax-all -disable-free -main-file-name
test.cpp -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose
-munwind-tables -target-cpu core2 -target-linker-version 236.3
-dwarf-column-info -resource-dir
/opt/local/libexec/llvm-3.6/bin/../lib/clang/3.6.0 -I . -stdlib=libc++
-std=c++11 -fdeprecated-macro -fdebug-compilation-dir
/Users/d97sjan/Dropbox/src/cpp/bigdata_regression/include -ferror-limit 19
-fmessage-length 162 -stack-protector 1 -mstackrealign -fblocks
-fobjc-runtime=macosx-10.10.0 -fencode-extended-block-signature
-fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option
-fcolor-diagnostics -o
/var/folders/zj/615n13hn0b79rs3jb2m7zdtc0000gn/T/test-e6ef3f.o -x c++ test.cpp
1. ./range/v3/utility/meta.hpp:120:27: at annotation token
2. ./range/v3/utility/meta.hpp:18:1: parsing namespace 'ranges'
3. ./range/v3/utility/meta.hpp:20:12: parsing namespace 'v3'
4. ./range/v3/utility/meta.hpp:117:9: parsing struct/union/class body
'meta_bind_front'
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.6.0 (trunk 216817)
Target: x86_64-apple-darwin14.0.0
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:
********************
===Specifics on version===
--Causing bug--
clang 3.6 from macports (updated 2014-11-19)
clang-3.6 @3.6-r216817 lang/llvm-3.6
$ clang --version
clang version 3.6.0 (trunk 216817)
Target: x86_64-apple-darwin14.0.0
Thread model: posix
--Working--
$ /usr/bin/clang --version
Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix
===Preprocessed data===
Source test-806ba4.cpp:
attached as file
Run script test-806ba4.sh:
"/opt/local/libexec/llvm-3.6/bin/clang" -cc1 -triple x86_64-apple-macosx10.10.0
-emit-obj -mrelax-all -disable-free -main-file-name test.cpp -mrelocation-model
pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu
core2 -target-linker-version 236.3 -dwarf-column-info -stdlib=libc++ -std=c++11
-fdeprecated-macro -ferror-limit 19 -fmessage-length 162 -stack-protector 1
-mstackrealign -fblocks -fobjc-runtime=macosx-10.10.0
-fencode-extended-block-signature -fcxx-exceptions -fexceptions
-fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -x c++
test-806ba4.cpp
--
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/20141119/1ee43ddf/attachment.html>
More information about the llvm-bugs
mailing list