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

    <tr>
        <th>Summary</th>
        <td>
            Clang-17 gets an internal error while building OpenSSH-9.5-P1 due to -fzero-call-used-regs
        </td>
    </tr>

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

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

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

<pre>
    ```
0.      Program arguments: cc -g -O2 -pipe -Wunknown-warning-option -Qunused-arguments -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result -Wmisleading-indentation -Wbitwise-instead-of-logical -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -ftrapv -fzero-call-used-regs=all -ftrivial-auto-var-init=zero -fno-builtin-memset -fstack-protector-strong -fPIE -I. -I. -I/usr/local/include -I/usr/local/include -I/usr/local/include/editline -DOPENSSL_API_COMPAT=0x10100000L -DSSHDIR=\"/usr/local/etc/ssh\" -D_PATH_SSH_PROGRAM=\"/usr/local/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/local/libexec/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/usr/local/libexec/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/usr/local/libexec/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/usr/local/libexec/ssh-pkcs11-helper\" -D_PATH_SSH_SK_HELPER=\"/usr/local/libexec/ssh-sk-helper\" -D_PATH_SSH_PIDDIR=\"/var/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -c ssh-ecdsa-sk.c -o ssh-ecdsa-sk.o
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'ssh-ecdsa-sk.c'.
4.      Running pass 'Prologue/Epilogue Insertion & Frame Finalization' on function '@ssh_ecdsa_sk_cleanup'
 #0 0x000000010f52f008 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/local/bin/cc+0x101447008)
 #1 0x000000010f52d0e9 llvm::sys::RunSignalHandlers() (/usr/local/bin/cc+0x1014450e9)
 #2 0x000000010f52e641 llvm::sys::CleanupOnSignal(unsigned long) (/usr/local/bin/cc+0x101446641)
 #3 0x000000010f481881 CrashRecoverySignalHandler(int) (/usr/local/bin/cc+0x101399881)
 #4 0x00007fff99b84b3a (/usr/lib/system/libsystem_platform.dylib+0x7fff8b3a5b3a)
 #5 0x00007fcbafb23c00 
 #6 0x000000010e89147a llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/local/bin/cc+0x1007a947a)
 #7 0x000000010ecbef65 llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/local/bin/cc+0x100bd6f65)
 #8 0x000000010ecc67d4 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/local/bin/cc+0x100bde7d4)
 #9 0x000000010ecbfc3c llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/local/bin/cc+0x100bd7c3c)
#10 0x000000010f8b33f3 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::__1::unique_ptr<llvm::raw_pwrite_stream, std::__1::default_delete<llvm::raw_pwrite_stream>>) (/usr/local/bin/cc+0x1017cb3f3)
#11 0x000000010fc574ab clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/usr/local/bin/cc+0x101b6f4ab)
#12 0x0000000111093c86 clang::ParseAST(clang::Sema&, bool, bool) (/usr/local/bin/cc+0x102fabc86)
#13 0x000000011005487a clang::FrontendAction::Execute() (/usr/local/bin/cc+0x101f6c87a)
#14 0x000000010ffafec4 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/local/bin/cc+0x101ec7ec4)
#15 0x00000001100d8c53 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/local/bin/cc+0x101ff0c53)
#16 0x000000010e0eff89 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/local/bin/cc+0x100007f89)
#17 0x000000010e0edf23 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) (/usr/local/bin/cc+0x100005f23)
#18 0x000000010fdba7de void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__1::optional<llvm::StringRef>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*, bool*) const::$_0>(long) (/usr/local/bin/cc+0x101cd27de)
#19 0x000000010f48163c llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/local/bin/cc+0x10139963c)
#20 0x000000010fdb9feb clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__1::optional<llvm::StringRef>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*, bool*) const (/usr/local/bin/cc+0x101cd1feb)
#21 0x000000010fd7a614 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/usr/local/bin/cc+0x101c92614)
#22 0x000000010fd7aaef clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*>>&, bool) const (/usr/local/bin/cc+0x101c92aef)
#23 0x000000010fd9b470 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*>>&) (/usr/local/bin/cc+0x101cb3470)
#24 0x000000010e0ed221 clang_main(int, char**, llvm::ToolContext const&) (/usr/local/bin/cc+0x100005221)
#25 0x000000010e0fb244 main (/usr/local/bin/cc+0x100013244)
#26 0x00007fff99975235 (/usr/lib/system/libdyld.dylib+0x7fff8b196235)
#27 0x000000000000002c 
cc: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 17.0.3
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /usr/local/bin
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsWU1z2zjS_jX0BUUVCVL8OPig6CP2JBnpNT1JzYkFgk0JryGAC4CyPb9-C6RkC7KcyLNTtZd1JTFDNLofPGg83SSJ1mwtAK698SdvPLsindlIdV1DJTdbIq4qWT9fe0mw_xPMvGASjLwgXym5VmSLiFp3WxBGe9EEUYr8NfKXGPktawH5PzrxIOSj8B-JEkysfdkaJgXy_68TnYbaf5mO_B-Ec-T_aCUTBpRPFDOb3gMTzDDC2V9QI_-HxetTuW2JsgEaqbbE-Bpop5h57g3-Atn4Bz9b2BJKQdsIQr7ctm6GO3skCnTHDfJ_bJnmQGqLlokahCED5B8VM49Mg8-ENkBqXzY-l2tGCUd-I6SvjWLU-IQzoplYI39WLpZ397eLP8ti-cfddO5FM4z8xijS7pDf_AVK-pRw7u8BrLUXzXoWGqPYjhHuk85If0eUb0nwopmdM0SrOsYNE3Z9GgzyG20IffBbJQ1QI5WFIy2KZnU7R_7taP_Xw4tOKw8vuKSEe3jBBOVdDX9vyMMLqJnhTADyZ8vV_Pei-FpOVrfldPltNbn3olnwFAZhYH--In9WFDez2zsvmnnjqYfxG79gqIcXWm-GcUvianJ_UxbFTbm6W36-m3x7f3LFxLuTJ8WX1aQoytl8Mfnj6_37Tjir4An2KHyiH1qi9anDxf2qLOZ33-c_WcqRo8a0vga1A3UG2Zf5n2Vx-_n3SyE9wLPN3nMEfZkWYVjezL-uLgSmN377QHUY-hvg7Vl4xZcPOtQP7ztb3c5Otn9HrCfVna5ndXf7vZivyunN3XJ5X56dBdvWPL_Mu5l8n5fT5e-L28_lDfIpsmCA1pr4-mFEkS_dO3KQs9DKmRdNQTZeNEctURoUIgaBqJFsUMM4DJbYWk5lDWgNAlSv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