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

    <tr>
        <th>Summary</th>
        <td>
            clang-15.0.0 crashes when using consteval and coverage
        </td>
    </tr>

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

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

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

<pre>
    output:
```
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /usr/local/bin/clang++ -g -fmacro-backtrace-limit=0 -fms-extensions -fdeclspec -fborland-extensions -fchar8_t -fdiagnostics-color=always -g3 -ftrapv -ftrivial-auto-var-init=pattern -fcheck-new -fdebug-macro -grecord-gcc-switches -grecord-command-line -O0 -fno-inline -fno-inline-functions -fprofile-instr-generate -fcoverage-mapping -Weverything -Wno-constexpr-not-const -Wno-c++1y-extensions -Wno-c++1z-extensions -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-c++98-c++11-compat-pedantic -Wno-documentation-unknown-command -Wno-gnu-zero-variadic-macro-arguments -Wno-language-extension-token -Wno-missing-prototypes -Wno-missing-variable-declarations -Wno-padded -Wno-switch-enum -Wno-unused-macros -Wno-unused-template -Wno-variadic-macros -Wno-weak-vtables -Wno-unused-function -pthread -std=c++2b -fcolor-diagnostics -Werror -DPHI_CONFIG_ALWAYS_INLINE_OVERWRITE=PHI_NEVER_INLINE -DPHI_CONFIG_FPM_DEFAULT -DPHI_CONFIG_PEDANTIC_WARNINGS -DPHI_CONFIG_WARNINGS_AS_ERRORS -DCMAKE_INTDIR=\"Debug\" -I/mnt/data/dev/Phi/tests/PhiCore/unittests/include -I/mnt/data/dev/Phi/libs/PhiCore/include -I/mnt/data/dev/Phi/build-clang-coverage/generated-includes -I/mnt/data/dev/Phi/libs/PhiTest/include -c -MD -MT tests/PhiCore/unittests/CMakeFiles/Phi_CoreUnittest-23.dir/Debug/src/type_traits/is_constant_evaluated.test.cpp.o -MF tests/PhiCore/unittests/CMakeFiles/Phi_CoreUnittest-23.dir/Debug/src/type_traits/is_constant_evaluated.test.cpp.o.d -fcolor-diagnostics -o tests/PhiCore/unittests/CMakeFiles/Phi_CoreUnittest-23.dir/Debug/src/type_traits/is_constant_evaluated.test.cpp.o /mnt/data/dev/Phi/tests/PhiCore/unittests/src/type_traits/is_constant_evaluated.test.cpp
1.      <eof> parser at end of file
2.      Per-file LLVM IR generation
3.      /mnt/data/dev/Phi/libs/PhiCore/include/phi/type_traits/is_constant_evaluated.hpp:22:48: Generating code for declaration 'phi::is_constant_evaluated'
 #0 0x0000560b820538f4 PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
 #1 0x0000560b8205161c llvm::sys::CleanupOnSignal(unsigned long) (/usr/local/bin/clang+++0x382661c)
 #2 0x0000560b81f90378 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x00007f5250f69a40 (/usr/lib/libc.so.6+0x38a40)
 #4 0x0000560b84cf7540 clang::Stmt::getBeginLoc() const (/usr/local/bin/clang+++0x64cc540)
 #5 0x0000560b8254dedd (anonymous namespace)::CoverageMappingBuilder::getStart(clang::Stmt const*) CoverageMappingGen.cpp:0:0
 #6 0x0000560b825559e3 (anonymous namespace)::CounterCoverageMappingBuilder::extendRegion(clang::Stmt const*) CoverageMappingGen.cpp:0:0
 #7 0x0000560b82559bd1 clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::CounterCoverageMappingBuilder, void>::Visit(clang::Stmt const*) CoverageMappingGen.cpp:0:0
 #8 0x0000560b8255c943 (anonymous namespace)::CounterCoverageMappingBuilder::VisitStmt(clang::Stmt const*) CoverageMappingGen.cpp:0:0
 #9 0x0000560b82560a9f clang::CodeGen::CoverageMappingGen::emitCounterMapping(clang::Decl const*, llvm::raw_ostream&) (/usr/local/bin/clang+++0x3d35a9f)
#10 0x0000560b82525202 clang::CodeGen::CodeGenPGO::emitCounterRegionMapping(clang::Decl const*) (/usr/local/bin/clang+++0x3cfa202)
#11 0x0000560b825417c3 clang::CodeGen::CodeGenPGO::assignRegionCounters(clang::GlobalDecl, llvm::Function*) (/usr/local/bin/clang+++0x3d167c3)
#12 0x0000560b824d4824 clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/usr/local/bin/clang+++0x3ca9824)
#13 0x0000560b82519b65 clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/usr/local/bin/clang+++0x3ceeb65)
#14 0x0000560b8251582c clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/usr/local/bin/clang+++0x3cea82c)
#15 0x0000560b8251dee4 clang::CodeGen::CodeGenModule::EmitDeferred() (/usr/local/bin/clang+++0x3cf2ee4)
#16 0x0000560b8251defc clang::CodeGen::CodeGenModule::EmitDeferred() (/usr/local/bin/clang+++0x3cf2efc)
#17 0x0000560b8251f46b clang::CodeGen::CodeGenModule::Release() (/usr/local/bin/clang+++0x3cf446b)
#18 0x0000560b831f273a (anonymous namespace)::CodeGeneratorImpl::HandleTranslationUnit(clang::ASTContext&) ModuleBuilder.cpp:0:0
#19 0x0000560b831f02ed clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/usr/local/bin/clang+++0x49c52ed)
#20 0x0000560b83db20a9 clang::ParseAST(clang::Sema&, bool, bool) (/usr/local/bin/clang+++0x55870a9)
#21 0x0000560b82b2dc59 clang::FrontendAction::Execute() (/usr/local/bin/clang+++0x4302c59)
#22 0x0000560b82ab48f9 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/local/bin/clang+++0x42898f9)
#23 0x0000560b82beb263 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/local/bin/clang+++0x43c0263)
#24 0x0000560b7f95e0a0 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/local/bin/clang+++0x11330a0)
#25 0x0000560b7f957afd ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
#26 0x0000560b829202c5 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) Job.cpp:0:0
#27 0x0000560b81f90483 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/local/bin/clang+++0x3765483)
#28 0x0000560b8292066f 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.0) Job.cpp:0:0
#29 0x0000560b828ec035 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/usr/local/bin/clang+++0x40c1035)
#30 0x0000560b828eca4d clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&, bool) const (/usr/local/bin/clang+++0x40c1a4d)
#31 0x0000560b828fcd1c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/usr/local/bin/clang+++0x40d1d1c)
#32 0x0000560b7f95c06c clang_main(int, char**) (/usr/local/bin/clang+++0x113106c)
#33 0x00007f5250f542d0 (/usr/lib/libc.so.6+0x232d0)
#34 0x00007f5250f5438a __libc_start_main (/usr/lib/libc.so.6+0x2338a)
#35 0x0000560b7f956f95 _start /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:117:0
clang-15: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 15.0.0 (https://github.com/llvm/llvm-project.git 4ba6a9c9f65bbc8bd06e3652cb20fd4dfc846137)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang-15: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-15: note: diagnostic msg: /tmp/is_constant_evaluated-377219.cpp
clang-15: note: diagnostic msg: /tmp/is_constant_evaluated-377219.sh
clang-15: note: diagnostic msg: 

********************
```

[is_constant_evaluated-377219.zip](https://github.com/llvm/llvm-project/files/9540237/is_constant_evaluated-377219.zip)

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzlWltz4joS_jXkRWXKd-yHPBAgGXZzK-DM1D5RsiyDN8Z2SXIu8-u3JdmACLmQSZ3zsCkCtiR3f31Rd0tyUqUv51Uj6kb0vGHPHvfsYS-024-6vb-eDOcTxJtkkwuEUdKsEKN1xQQSFVoLUXP5qHsJn1Uu1k3SJ9UGborisfuxalb9lxIBtznnDeVwgXCZorwkRZNSJNYUEYb5GiWYPAiGCe25I1QDI1YRyjlNEa8appvlk5jziuRYQAdrSsQJy2vR15DnAoigtNnUW6HsPlJ_96xaMbxBmK2aDS2FxI4ATcOZxFoRXMBvkpfwTQpcrnruBXyQtUJWtsGEVdYWoVXkoJKeN7ZlH7fos6Alz6uSw31KScFrSuAyqRhQSs1-ssYsWgo5MsersuIiJ9wiVVExoIiLJ_wCw1YeDABm9aP6zR9zXFi4EZX1iJmVl4p9jYWgrFREKXmwSvqkAIClLAUZ6DBKKpZaK0Is_pQLGMh3rWCvjQRY5CVF1p0Up6yAur7fXVtZUxLRCgCGyfKCQhcXzFrRkjKwhgRRPcLligLvus5LUNwvCi0vYq1vgBwBEoI-18wqK6Hv2g6tbufFUNZ-z--3euJIygG6ON5q1TTFJSj5VXdL2Dk-MK2IchQs5baa8qGsnspOY3rIqmys35Qpm-Q4zYnWurX1MT1MelMj9bIVwBLVAy117wYmBuhHzhRRiZeacrNd0U5A39KxMMNip4AapyltsWjjWrRsN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