[llvm-bugs] [Bug 48593] New: [Concepts] ICE on syntax error, in ConvertConstrainedAutoDeclSpecToType

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Dec 24 13:50:05 PST 2020


https://bugs.llvm.org/show_bug.cgi?id=48593

            Bug ID: 48593
           Summary: [Concepts] ICE on syntax error, in
                    ConvertConstrainedAutoDeclSpecToType
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++2a
          Assignee: unassignedclangbugs at nondot.org
          Reporter: arthur.j.odwyer at gmail.com
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

// https://godbolt.org/z/8Tb4aa
template<class> concept C = true;
C<,> x

Originally reported by Leander Behr on the cpplang slack.


<source>:3:3: error: expected expression
C<,> x
  ^
<source>:3:1: error: expected 'auto' or 'decltype(auto)' after concept name
C<,> x
^
     auto
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /opt/compiler-explorer/clang-11.0.0/bin/clang++ -g
-o ./output.s -mllvm --x86-asm-syntax=intel -S
--gcc-toolchain=/opt/compiler-explorer/gcc-10.2.0 -fcolor-diagnostics
-fno-crash-diagnostics -std=c++20 -O3 <source> 
1.      <eof> parser at end of file
 #0 0x0000556f4e0b547a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x2cab47a)
 #1 0x0000556f4e0b3224 llvm::sys::RunSignalHandlers()
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x2ca9224)
 #2 0x0000556f4e0b3495 llvm::sys::CleanupOnSignal(unsigned long)
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x2ca9495)
 #3 0x0000556f4e027cc0 CrashRecoverySignalHandler(int)
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x2c1dcc0)
 #4 0x00007f672cfc23c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
 #5 0x0000556f50373f5b ConvertConstrainedAutoDeclSpecToType(clang::Sema&,
clang::DeclSpec&, clang::AutoTypeKeyword) (.isra.674)
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x4f69f5b)
 #6 0x0000556f50389932 GetDeclSpecTypeForDeclarator((anonymous
namespace)::TypeProcessingState&, clang::TypeSourceInfo*&) (.constprop.1044)
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x4f7f932)
 #7 0x0000556f50396e53 clang::Sema::GetTypeForDeclarator(clang::Declarator&,
clang::Scope*) (/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x4f8ce53)
 #8 0x0000556f4fe378ee clang::Sema::HandleDeclarator(clang::Scope*,
clang::Declarator&, llvm::MutableArrayRef<clang::TemplateParameterList*>)
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x4a2d8ee)
 #9 0x0000556f4fe38569 clang::Sema::ActOnDeclarator(clang::Scope*,
clang::Declarator&) (/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x4a2e569)
#10 0x0000556f4fc07d70
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*)
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x47fdd70)
#11 0x0000556f4fc0e705 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x4804705)
#12 0x0000556f4fbf0df9
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x47e6df9)
#13 0x0000556f4fbf1af1
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) (.part.228)
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x47e7af1)
#14 0x0000556f4fbf79c9
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x47ed9c9)
#15 0x0000556f4fbf90d9
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x47ef0d9)
#16 0x0000556f4fbecd19 clang::ParseAST(clang::Sema&, bool, bool)
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x47e2d19)
#17 0x0000556f4e8a1479 clang::FrontendAction::Execute()
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x3497479)
#18 0x0000556f4e85af9b
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x3450f9b)
#19 0x0000556f4e967b2b
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x355db2b)
#20 0x0000556f4c29014c cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/opt/compiler-explorer/clang-11.0.0/bin/clang+++0xe8614c)
#21 0x0000556f4c28cc4d ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0xe82c4d)
#22 0x0000556f4e732c45 void llvm::function_ref<void
()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const::'lambda'()>(long)
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x3328c45)
#23 0x0000556f4e027da3
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x2c1dda3)
#24 0x0000556f4e733720
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const (.part.148)
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x3329720)
#25 0x0000556f4e70d8f5
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x33038f5)
#26 0x0000556f4e70e33f
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x330433f)
#27 0x0000556f4e716ed5
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0x330ced5)
#28 0x0000556f4c1ccdc1 main
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0xdc2dc1)
#29 0x00007f672ca730b3 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x270b3)
#30 0x0000556f4c28c7ca _start
(/opt/compiler-explorer/clang-11.0.0/bin/clang+++0xe827ca)

-- 
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/20201224/4060cfaa/attachment.html>


More information about the llvm-bugs mailing list