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

    <tr>
        <th>Summary</th>
        <td>
            Clang-18 crash: unsupported operating system.
        </td>
    </tr>

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

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

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

<pre>
    Clang-18 with -O2 -miamcu -fsanitize=memory -c crashes on the test case.
Compiler explorer: https://godbolt.org/z/ezYx6EGxd
```
$cat mutant.c
char a[10], b[10];

int f(int i)
{
  return a[i+1] + b[i+1];
}

$clang-18 -O2 -miamcu -fsanitize=memory -c mutant.c
fatal error: error in backend: unsupported operating system
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: clang-18 -O2 -miamcu -fsanitize=memory -c mutant.c
1. <eof> parser at end of file
2.      Optimizer
 #0 0x00007fa65d7c2266 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/llvm-18/bin/../lib/libLLVM-18.so.1+0xd2b266)
 #1 0x00007fa65d7c0170 llvm::sys::RunSignalHandlers() (/usr/lib/llvm-18/bin/../lib/libLLVM-18.so.1+0xd29170)
 #2 0x00007fa65d7c18c4 llvm::sys::CleanupOnSignal(unsigned long) (/usr/lib/llvm-18/bin/../lib/libLLVM-18.so.1+0xd2a8c4)
 #3 0x00007fa65d70f9ae (/usr/lib/llvm-18/bin/../lib/libLLVM-18.so.1+0xc789ae)
 #4 0x00007fa65d70f96b (/usr/lib/llvm-18/bin/../lib/libLLVM-18.so.1+0xc7896b)
 #5 0x00007fa65d7bca67 llvm::sys::Process::Exit(int, bool) (/usr/lib/llvm-18/bin/../lib/libLLVM-18.so.1+0xd25a67)
 #6 0x0000562ab51dac23 (/usr/lib/llvm-18/bin/clang+0x13c23)
 #7 0x00007fa65d71dc4f llvm::report_fatal_error(llvm::Twine const&, bool) (/usr/lib/llvm-18/bin/../lib/libLLVM-18.so.1+0xc86c4f)
 #8 0x00007fa65d71db26 (/usr/lib/llvm-18/bin/../lib/libLLVM-18.so.1+0xc86b26)
 #9 0x00007fa65e49f0f6 llvm::MemorySanitizerPass::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/lib/llvm-18/bin/../lib/libLLVM-18.so.1+0x1a080f6)
#10 0x00007fa665fb265d (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18+0x1aeb65d)
#11 0x00007fa65d93c864 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/lib/llvm-18/bin/../lib/libLLVM-18.so.1+0xea5864)
#12 0x00007fa665fabd43 (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18+0x1ae4d43)
#13 0x00007fa665fa4d52 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18+0x1addd52)
#14 0x00007fa66633b5fe (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18+0x1e745fe)
#15 0x00007fa664f57866 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18+0xa90866)
#16 0x00007fa666daf645 clang::FrontendAction::Execute() (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18+0x28e8645)
#17 0x00007fa666d2dcc4 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18+0x2866cc4)
#18 0x00007fa666e2a1c0 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18+0x29631c0)
#19 0x0000562ab51da837 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/lib/llvm-18/bin/clang+0x13837)
#20 0x0000562ab51d7905 (/usr/lib/llvm-18/bin/clang+0x10905)
#21 0x00007fa6669c5909 (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18+0x24fe909)
#22 0x00007fa65d70f94c llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/lib/llvm-18/bin/../lib/libLLVM-18.so.1+0xc7894c)
#23 0x00007fa6669c52ae 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-18/bin/../lib/libclang-cpp.so.18+0x24fe2ae)
#24 0x00007fa66698d0f1 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18+0x24c60f1)
#25 0x00007fa66698d33e clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18+0x24c633e)
#26 0x00007fa6669a939c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/usr/lib/llvm-18/bin/../lib/libclang-cpp.so.18+0x24e239c)
#27 0x0000562ab51d725c clang_main(int, char**, llvm::ToolContext const&) (/usr/lib/llvm-18/bin/clang+0x1025c)
#28 0x0000562ab51e4f32 main (/usr/lib/llvm-18/bin/clang+0x1df32)
#29 0x00007fa65bca6c87 __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:344:0
#30 0x0000562ab51d41ea _start (/usr/lib/llvm-18/bin/clang+0xd1ea)
clang-18: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Ubuntu clang version 18.0.0 (++20231018091808+48a53509e851-1~exp1~20231018091910.1571)
Target: i586-intel-elfiamcu
Thread model: posix
InstalledDir: /usr/bin
clang-18: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-18: note: diagnostic msg: /tmp/mutant-a7707e.c
clang-18: note: diagnostic msg: /tmp/mutant-a7707e.sh
clang-18: note: diagnostic msg: 

********************
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMWV1z4ygW_TXKC2UXQt8PeXCcuLun0ptUJzNbuy8uBFcOOxJoAaWTfpjfvoUk28JxppOMd2u7XB2Jj3sPh8u5IKgxYiMBzoPkIkguz2hnH5Q-F7ShUsnnRnWGmbNS8efzZU3lZhbm6LuwD2h2Q9CsEbRhHZpVhkphxQ8IossGGqWf0Ywhpql5AIOURPYBkAVjEaMG5gG-DPBiqZpW1KARPLW10qCDaIEerG1NEC0CsgrIaqN4qWo7V3oTkNWPgKzgxz-e0qtPT3ywEaR4_A2vJGbUoqazVNo5GwrZA9WIBslFiIPkMiBLVO5eoouxY_-_kBZVAcndXxGQYqzLxkYIabCdlr0xEZCLMEguUUAueoPbgr3N7HJq3GHbMvgG8vwxVNTSGoHWqmepf0BCopKy30FyV9ZJ07Wt0hY4Ui1oaoXcIPNsLDSDkdvrq8XdFTJd2QiLKCq7DdLguiCrDpkX9qEr50w1AVnV9eP2z6zV6l_AbEBWwpgOTEBWiEqOhGR1x6Gf6X7ie2xWUwaO8lZDqxUDY4Ajozo9FLue1BjFBHW4dSeRYVq0doyRO0vZ74h3TeuQ9UV4jm612mjaIKo3XQPSOtjo4-SGcxRES1BVEF2hlmoDGlGLQHKkKlSJGoZ2ZI76fzetFY34AXoMi4BEGOEnjDHOKpomPGOEpCnqaYsWQ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