<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - front end assertion: function has too many parameers"
   href="https://bugs.llvm.org/show_bug.cgi?id=36393">36393</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>front end assertion: function has too many parameers
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ruttenberg@reservoir.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=19867" name="attach_19867" title="Reproducer">attachment 19867</a> <a href="attachment.cgi?id=19867&action=edit" title="Reproducer">[details]</a></span>
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:</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>