[llvm-bugs] [Bug 49910] New: ICE in clang::InitializationSequence on invalid code

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Apr 9 13:06:17 PDT 2021


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

            Bug ID: 49910
           Summary: ICE in clang::InitializationSequence on invalid code
           Product: clang
           Version: 11.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++2a
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ldalessandro 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

Experienced on Debian with 11.0.1.

/home/ldalessa/cswarm/mrwt/examples/dense.cpp:51:29: error: no matching
function for call to 'vector'
  constexpr ttl::Tensor v = ttl::vector("v");
                            ^~~~~~~~~~~
/home/ldalessa/cswarm/mrwt/include/ttl/Tensor.hpp:104:18: note: candidate
template ignored: couldn't infer template argument 'constant'
  constexpr auto vector(std::string_view id) -> Tensor
                 ^
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: /usr/bin/clang++ -DDIM=2 -DFMT_LOCALE -DFMT_SHARED
-DLUA_COMPAT_5_2 -DLUA_USE_LINUX -DMRWT_ENABLE_DEBUG -DMRWT_ENABLE_VERBOSE
-DTTL_TREE_INDEX_CAPACITY=8 -I/home/ldalessa/cswarm/mrwt/include
-I/home/ldalessa/cswarm/mrwt/clang/_deps/fmt-src/include
-I/home/ldalessa/cswarm/mrwt/clang/_deps/ce-src/include
-I/home/ldalessa/cswarm/mrwt/clang/_deps/docopt-src
-I/home/ldalessa/cswarm/mrwt/clang/_deps/lua-src/src -isystem
/usr/include/vtk-9.0 -ferror-limit=4 -fconstexpr-steps=12712420 -g
-fopenmp=libomp -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -std=gnu++20 -o
CMakeFiles/dense.dir/dense.cpp.o -c
/home/ldalessa/cswarm/mrwt/examples/dense.cpp 
1.      <eof> parser at end of file
2.      /home/ldalessa/cswarm/mrwt/examples/dense.cpp:78:5: instantiating
function definition 'run_sedov<2>'
 #0 0x00007f628111ff8f llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xbd0f8f)
 #1 0x00007f628111e2f0 llvm::sys::RunSignalHandlers()
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xbcf2f0)
 #2 0x00007f628111f6dd llvm::sys::CleanupOnSignal(unsigned long)
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xbd06dd)
 #3 0x00007f6281063dc0 (/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xb14dc0)
 #4 0x00007f62882f8140 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x14140)
 #5 0x00007f62869e2c18 clang::InitializationSequence::Perform(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
llvm::MutableArrayRef<clang::Expr*>, clang::QualType*)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1395c18)
 #6 0x00007f62867f3f21 (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x11a6f21)
 #7 0x00007f62867f3695
clang::Sema::SetCtorInitializers(clang::CXXConstructorDecl*, bool,
llvm::ArrayRef<clang::CXXCtorInitializer*>)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x11a6695)
 #8 0x00007f628681672f
clang::Sema::DefineImplicitDefaultConstructor(clang::SourceLocation,
clang::CXXConstructorDecl*)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x11c972f)
 #9 0x00007f62866048cb
clang::Sema::runWithSufficientStackSpace(clang::SourceLocation,
llvm::function_ref<void ()>)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0xfb78cb)
#10 0x00007f62869e8ec4 (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x139bec4)
#11 0x00007f62869e1184 clang::InitializationSequence::Perform(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
llvm::MutableArrayRef<clang::Expr*>, clang::QualType*)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1394184)
#12 0x00007f628674daf2 clang::Sema::ActOnUninitializedDecl(clang::Decl*)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1100af2)
#13 0x00007f6286c4e204
clang::Sema::InstantiateVariableInitializer(clang::VarDecl*, clang::VarDecl*,
clang::MultiLevelTemplateArgumentList const&)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1601204)
#14 0x00007f6286c42dc1 clang::Sema::BuildVariableInstantiation(clang::VarDecl*,
clang::VarDecl*, clang::MultiLevelTemplateArgumentList const&,
llvm::SmallVector<clang::Sema::LateInstantiatedAttribute, 16u>*,
clang::DeclContext*, clang::LocalInstantiationScope*, bool,
clang::VarTemplateSpecializationDecl*)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x15f5dc1)
#15 0x00007f6286c42641
clang::TemplateDeclInstantiator::VisitVarDecl(clang::VarDecl*, bool,
llvm::ArrayRef<clang::BindingDecl*>*)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x15f5641)
#16 0x00007f6286c56c74 (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1609c74)
#17 0x00007f62866048cb
clang::Sema::runWithSufficientStackSpace(clang::SourceLocation,
llvm::function_ref<void ()>)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0xfb78cb)
#18 0x00007f6286c4f8ab clang::Sema::SubstDecl(clang::Decl*,
clang::DeclContext*, clang::MultiLevelTemplateArgumentList const&)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x16028ab)
#19 0x00007f6286c340ca (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x15e70ca)
#20 0x00007f6286c2f68e (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x15e268e)
#21 0x00007f6286c187e1 clang::Sema::SubstStmt(clang::Stmt*,
clang::MultiLevelTemplateArgumentList const&)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x15cb7e1)
#22 0x00007f6286c52090
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool, bool)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1605090)
#23 0x00007f6286c54582 clang::Sema::PerformPendingInstantiations(bool)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1607582)
#24 0x00007f6286606055
clang::Sema::ActOnEndOfTranslationUnitFragment(clang::Sema::TUFragmentKind)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0xfb9055)
#25 0x00007f6286606775 clang::Sema::ActOnEndOfTranslationUnit()
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0xfb9775)
#26 0x00007f62860c1bc1
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0xa74bc1)
#27 0x00007f62860246ed clang::ParseAST(clang::Sema&, bool, bool)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x9d76ed)
#28 0x00007f62875f00c8 clang::FrontendAction::Execute()
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1fa30c8)
#29 0x00007f62875a6641
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1f59641)
#30 0x00007f6287656200
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x2009200)
#31 0x00000000004131bf cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/bin/clang+++0x4131bf)
#32 0x00000000004115fe (/usr/bin/clang+++0x4115fe)
#33 0x00007f62872d9732 (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1c8c732)
#34 0x00007f6281063bcd
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xb14bcd)
#35 0x00007f62872d8c5f
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1c8bc5f)
#36 0x00007f62872b0a7f
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1c63a7f)
#37 0x00007f62872b0c27
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1c63c27)
#38 0x00007f62872c478c
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1c7778c)
#39 0x00000000004110a3 main (/usr/bin/clang+++0x4110a3)
#40 0x00007f6280083d0a __libc_start_main ./csu/../csu/libc-start.c:308:16
#41 0x000000000040e89a _start (/usr/bin/clang+++0x40e89a)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
Debian clang version 11.0.1-2
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
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/dense-feaf8f.cpp
clang: note: diagnostic msg: /tmp/dense-feaf8f.sh
clang: note: diagnostic msg: 

********************

-- 
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/20210409/c1fd069f/attachment-0001.html>


More information about the llvm-bugs mailing list