<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/84087>84087</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            ICE on valid code during LLVM IR generation
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ericniebler
      </td>
    </tr>
</table>

<pre>
    

```
[build] [1/2  50% :: 2.757] /usr/bin/clang++-17 -DSTDEXEC_ENABLE_EXTRA_TYPE_CHECKING -I/home/eniebler/Code/stdexec/include -fsanitize=address -Wsign-conversion -Wnarrowing -Werror -g -std=c++20 -Wall -ferror-limit=0 -fmacro-backtrace-limit=0 -ftemplate-backtrace-limit=0 -MD -MT examples/CMakeFiles/example.hello_world.dir/hello_world.cpp.o -MF examples/CMakeFiles/example.hello_world.dir/hello_world.cpp.o.d -o examples/CMakeFiles/example.hello_world.dir/hello_world.cpp.o -c /home/eniebler/Code/stdexec/examples/hello_world.cpp
[build] FAILED: examples/CMakeFiles/example.hello_world.dir/hello_world.cpp.o 
[build] /usr/bin/clang++-17 -DSTDEXEC_ENABLE_EXTRA_TYPE_CHECKING -I/home/eniebler/Code/stdexec/include -fsanitize=address -Wsign-conversion -Wnarrowing -Werror -g -std=c++20 -Wall -ferror-limit=0 -fmacro-backtrace-limit=0 -ftemplate-backtrace-limit=0 -MD -MT examples/CMakeFiles/example.hello_world.dir/hello_world.cpp.o -MF examples/CMakeFiles/example.hello_world.dir/hello_world.cpp.o.d -o examples/CMakeFiles/example.hello_world.dir/hello_world.cpp.o -c /home/eniebler/Code/stdexec/examples/hello_world.cpp
[build] PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
[build] Stack dump:
[build] 0.      Program arguments: /usr/bin/clang++-17 -DSTDEXEC_ENABLE_EXTRA_TYPE_CHECKING -I/home/eniebler/Code/stdexec/include -fsanitize=address -Wsign-conversion -Wnarrowing -Werror -g -std=c++20 -Wall -ferror-limit=0 -fmacro-backtrace-limit=0 -ftemplate-backtrace-limit=0 -MD -MT examples/CMakeFiles/example.hello_world.dir/hello_world.cpp.o -MF examples/CMakeFiles/example.hello_world.dir/hello_world.cpp.o.d -o examples/CMakeFiles/example.hello_world.dir/hello_world.cpp.o -c /home/eniebler/Code/stdexec/examples/hello_world.cpp
[build] 1.      <eof> parser at end of file
[build] 2.      Per-file LLVM IR generation
[build] 3.      /home/eniebler/Code/stdexec/include/stdexec/__detail/__basic_sender.hpp:464:7: Generating code for declaration 'stdexec::__detail::__captures'
[build] #0 0x00007f71e7ecc406 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/llvm-17/bin/../lib/libLLVM-17.so.1+0xccc406)
[build]  #1 0x00007f71e7eca5b0 llvm::sys::RunSignalHandlers() (/usr/lib/llvm-17/bin/../lib/libLLVM-17.so.1+0xcca5b0)
[build]  #2 0x00007f71e7e20d70 (/usr/lib/llvm-17/bin/../lib/libLLVM-17.so.1+0xc20d70)
[build]  #3 0x00007f71e6a42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
[build]  #4 0x00007f71e7fe6943 llvm::Instruction::eraseFromParent() (/usr/lib/llvm-17/bin/../lib/libLLVM-17.so.1+0xde6943)
[build]  #5 0x00007f71f05e5df0 (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x1be5df0)
[build]  #6 0x00007f71f05e74cd (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x1be74cd)
[build]  #7 0x00007f71f05db2bf clang::CodeGen::CodeGenFunction::EmitAggExpr(clang::Expr const*, clang::CodeGen::AggValueSlot) (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x1bdb2bf)
[build]  #8 0x00007f71f071383a clang::CodeGen::CodeGenFunction::EmitReturnStmt(clang::ReturnStmt const&) (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x1d1383a)
[build]  #9 0x00007f71f071bb6c clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x1d1bb6c)
[build] #10 0x00007f71f0774c0a clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*) (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x1d74c0a)
[build] #11 0x00007f71f0775884 clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x1d75884)
[build] #12 0x00007f71f0795549 clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x1d95549)
[build] #13 0x00007f71f078ed78 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x1d8ed78)
[build] #14 0x00007f71f07827b3 clang::CodeGen::CodeGenModule::EmitDeferred() (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x1d827b3)
[build] #15 0x00007f71f07827cf clang::CodeGen::CodeGenModule::EmitDeferred() (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x1d827cf)
[build] #16 0x00007f71f07827cf clang::CodeGen::CodeGenModule::EmitDeferred() (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x1d827cf)
[build] #17 0x00007f71f07827cf clang::CodeGen::CodeGenModule::EmitDeferred() (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x1d827cf)
[build] #18 0x00007f71f07827cf clang::CodeGen::CodeGenModule::EmitDeferred() (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x1d827cf)
[build] #19 0x00007f71f07827cf clang::CodeGen::CodeGenModule::EmitDeferred() (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x1d827cf)
[build] #20 0x00007f71f07808bb clang::CodeGen::CodeGenModule::Release() (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x1d808bb)
[build] #21 0x00007f71f0828118 (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x1e28118)
[build] #22 0x00007f71f076b420 (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x1d6b420)
[build] #23 0x00007f71ef437816 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0xa37816)
[build] #24 0x00007f71f11570c5 clang::FrontendAction::Execute() (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x27570c5)
[build] #25 0x00007f71f10d26c4 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x26d26c4)
[build] #26 0x00007f71f11d0e84 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x27d0e84)
[build] #27 0x000055b2959bd856 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang++-17+0x12856)
[build] #28 0x000055b2959bb3c5 (/usr/bin/clang++-17+0x103c5)
[build] #29 0x00007f71f0d94c59 (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x2394c59)
[build] #30 0x00007f71e7e20b0c llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/lib/llvm-17/bin/../lib/libLLVM-17.so.1+0xc20b0c)
[build] #31 0x00007f71f0d9449e clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x239449e)
[build] #32 0x00007f71f0d5d40d clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x235d40d)
[build] #33 0x00007f71f0d5d66e clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x235d66e)
[build] #34 0x00007f71f0d791ed clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/usr/lib/llvm-17/bin/../lib/libclang-cpp.so.17+0x23791ed)
[build] #35 0x000055b2959bad2d clang_main(int, char**, llvm::ToolContext const&) (/usr/bin/clang++-17+0xfd2d)
[build] #36 0x000055b2959c7562 main (/usr/bin/clang++-17+0x1c562)
[build] #37 0x00007f71e6a29d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
[build] #38 0x00007f71e6a29e40 call_init ./csu/../csu/libc-start.c:128:20
[build] #39 0x00007f71e6a29e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
[build] #40 0x000055b2959b7df5 _start (/usr/bin/clang++-17+0xcdf5)
[build] clang++-17: error: clang frontend command failed with exit code 139 (use -v to see invocation)
[build] Ubuntu clang version 17.0.6 (++20231209124227+6009708b4367-1~exp1~20231209124336.77)
[build] Target: x86_64-pc-linux-gnu
[build] Thread model: posix
[build] InstalledDir: /usr/bin
[build] clang++-17: note: diagnostic msg: 
[build] ********************
[build] 
[build] PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
[build] Preprocessed source(s) and associated run script(s) are located at:
[build] clang++-17: note: diagnostic msg: /tmp/hello_world-22be60.cpp
[build] clang++-17: note: diagnostic msg: /tmp/hello_world-22be60.sh
[build] clang++-17: note: diagnostic msg: 
[build] 
[build] ********************
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/e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