[llvm-bugs] [Bug 36393] New: front end assertion: function has too many parameers
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Feb 15 05:26:06 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=36393
Bug ID: 36393
Summary: front end assertion: function has too many parameers
Product: new-bugs
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: ruttenberg at reservoir.com
CC: llvm-bugs at lists.llvm.org
Created attachment 19867
--> https://bugs.llvm.org/attachment.cgi?id=19867&action=edit
Reproducer
Attaching a test case from the gcc testsuite. Compile with clang -O0 -S. I
get:
clang-6.0: /home/ruttenberg/reservoir/px/llvm/clang/lib/AST/Type.cpp:2729:
clang::FunctionProtoType::FunctionProtoType(clang::QualType,
llvm::ArrayRef<clang::QualType>, clang::QualType, const
clang::FunctionProtoType::ExtProtoInfo&): Assertion `NumParams == params.size()
&& "function has too many parameters"' failed.
#0 0x00007ff9b766f86a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/ruttenberg/reservoir/px/llvm/llvm/lib/Support/Unix/Signals.inc:402:0
#1 0x00007ff9b766d6fe llvm::sys::RunSignalHandlers()
/home/ruttenberg/reservoir/px/llvm/llvm/lib/Support/Signals.cpp:50:0
#2 0x00007ff9b766d872 SignalHandler(int)
/home/ruttenberg/reservoir/px/llvm/llvm/lib/Support/Unix/Signals.inc:242:0
#3 0x00007ff9b50bc4b0 (/lib/x86_64-linux-gnu/libc.so.6+0x354b0)
#4 0x00007ff9b50bc428 gsignal
/build/glibc-Cl5G7W/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#5 0x00007ff9b50be02a abort /build/glibc-Cl5G7W/glibc-2.23/stdlib/abort.c:91:0
#6 0x00007ff9b50b4bd7 __assert_fail_base
/build/glibc-Cl5G7W/glibc-2.23/assert/assert.c:92:0
#7 0x00007ff9b50b4c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#8 0x00007ff9b20a1ce0 clang::FunctionProtoType::canThrow(clang::ASTContext
const&) const /home/ruttenberg/reservoir/px/llvm/clang/lib/AST/Type.cpp:2860:0
#9 0x00007ff9b1eb638a
clang::ASTContext::getFunctionTypeInternal(clang::QualType,
llvm::ArrayRef<clang::QualType>, clang::FunctionProtoType::ExtProtoInfo const&,
bool) const
/home/ruttenberg/reservoir/px/llvm/clang/lib/AST/ASTContext.cpp:3610:0
#10 0x00007ff9b04c75db GetFullTypeForDeclarator((anonymous
namespace)::TypeProcessingState&, clang::QualType, clang::TypeSourceInfo*)
/home/ruttenberg/reservoir/px/llvm/clang/lib/Sema/SemaType.cpp:4643:0
#11 0x00007ff9b04c94d3 ~TypeProcessingState
/home/ruttenberg/reservoir/px/llvm/clang/lib/Sema/SemaType.cpp:229:0
#12 0x00007ff9b04c94d3 clang::Sema::GetTypeForDeclarator(clang::Declarator&,
clang::Scope*)
/home/ruttenberg/reservoir/px/llvm/clang/lib/Sema/SemaType.cpp:4953:0
#13 0x00007ff9b00ea83e clang::TypeSourceInfo::getType() const
/home/ruttenberg/reservoir/px/llvm/clang/include/clang/AST/Decl.h:97:0
#14 0x00007ff9b00ea83e clang::Sema::HandleDeclarator(clang::Scope*,
clang::Declarator&, llvm::MutableArrayRef<clang::TemplateParameterList*>)
/home/ruttenberg/reservoir/px/llvm/clang/lib/Sema/SemaDecl.cpp:5354:0
#15 0x00007ff9b00edd6f clang::Sema::ActOnStartOfFunctionDef(clang::Scope*,
clang::Declarator&, llvm::MutableArrayRef<clang::TemplateParameterList*>,
clang::Sema::SkipBodyInfo*)
/home/ruttenberg/reservoir/px/llvm/clang/lib/Sema/SemaDecl.cpp:11833:0
#16 0x00007ff9b0a36421
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*)
/home/ruttenberg/reservoir/px/llvm/clang/lib/Parse/Parser.cpp:1147:0
#17 0x00007ff9b09b4db6 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
unsigned int, clang::SourceLocation*, clang::Parser::ForRangeInit*)
/home/ruttenberg/reservoir/px/llvm/clang/lib/Parse/ParseDecl.cpp:1961:0
#18 0x00007ff9b0a3276a
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
/home/ruttenberg/reservoir/px/llvm/clang/lib/Parse/Parser.cpp:987:0
#19 0x00007ff9b0a32e71
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) [clone .part.161] [clone
.constprop.184]
/home/ruttenberg/reservoir/px/llvm/clang/lib/Parse/Parser.cpp:1003:0
#20 0x00007ff9b0a32ecf
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier)
/home/ruttenberg/reservoir/px/llvm/clang/lib/Parse/Parser.cpp:1005:0
#21 0x00007ff9b0a3777d
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
/home/ruttenberg/reservoir/px/llvm/clang/lib/Parse/Parser.cpp:853:0
#22 0x00007ff9b0a3878c clang::AttributePool::~AttributePool()
/home/ruttenberg/reservoir/px/llvm/clang/include/clang/Sema/AttributeList.h:643:0
#23 0x00007ff9b0a3878c clang::ParsedAttributes::~ParsedAttributes()
/home/ruttenberg/reservoir/px/llvm/clang/include/clang/Sema/AttributeList.h:734:0
#24 0x00007ff9b0a3878c
clang::Parser::ParsedAttributesWithRange::~ParsedAttributesWithRange()
/home/ruttenberg/reservoir/px/llvm/clang/include/clang/Parse/Parser.h:1304:0
#25 0x00007ff9b0a3878c
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
/home/ruttenberg/reservoir/px/llvm/clang/lib/Parse/Parser.cpp:606:0
#26 0x00007ff9b0a38a10
clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
/home/ruttenberg/reservoir/px/llvm/clang/lib/Parse/Parser.cpp:536:0
#27 0x00007ff9b099720d clang::ParseAST(clang::Sema&, bool, bool)
/home/ruttenberg/reservoir/px/llvm/clang/lib/Parse/ParseAST.cpp:146:0
#28 0x00007ff9b638532f clang::CodeGenAction::ExecuteAction()
/home/ruttenberg/reservoir/px/llvm/clang/lib/CodeGen/CodeGenAction.cpp:1032:0
#29 0x00007ff9b5a98c96 clang::FrontendAction::Execute()
/home/ruttenberg/reservoir/px/llvm/clang/lib/Frontend/FrontendAction.cpp:897:0
#30 0x00007ff9b5a5e766
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
/home/ruttenberg/reservoir/px/llvm/clang/lib/Frontend/CompilerInstance.cpp:992:0
#31 0x00007ff9b57d65f2
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
/home/ruttenberg/reservoir/px/llvm/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:252:0
#32 0x000000000040fd58 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) /home/ruttenberg/reservoir/px/llvm/clang/tools/driver/cc1_main.cpp:221:0
#33 0x000000000040b3f7 ExecuteCC1Tool
/home/ruttenberg/reservoir/px/llvm/clang/tools/driver/driver.cpp:309:0
#34 0x000000000040b3f7 main
/home/ruttenberg/reservoir/px/llvm/clang/tools/driver/driver.cpp:388:0
#35 0x00007ff9b50a7830 __libc_start_main
/build/glibc-Cl5G7W/glibc-2.23/csu/../csu/libc-start.c:325:0
#36 0x000000000040c689 _start
(/mnt/ssd/ruttenberg/reservoir/px/install/bin/clang-6.0+0x40c689)
Stack dump:
--
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/20180215/85fee949/attachment.html>
More information about the llvm-bugs
mailing list