<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - ICE with multiple inheritance of vararg function on target triple i386-pc-windows-msvc19.16.27032"
   href="https://bugs.llvm.org/show_bug.cgi?id=43173">43173</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ICE with multiple inheritance of vararg function on target triple i386-pc-windows-msvc19.16.27032
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>9.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>steven@uplinklabs.net
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I've been trying to compile a very large C++ project on Windows with clang-cl,
and ran into at least one file that caused the compiler to ICE. I reduced a
test case using Clang running on Linux.

This affects the LLVM release_80, release_90 branches, and most likely others.

Here is a minimal test case:

---
class a {
  virtual void b(const char *...);
};
class c {
  virtual void b(const char *...);
};
class e : c, a {
  void b(const char *...);
} d;
---

Compile with:
clang -Xclang -triple -Xclang i386-pc-windows-msvc19.16.27032 testcase.cpp


Stack dump:
0.      Program arguments: /usr/bin/clang-8 -cc1 -triple x86_64-pc-linux-gnu
-emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names
-main-file-name evil.cpp -mrelocation-model pic -pic-level 2 -pic-is-pie
-mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-dwarf-column-info -debugger-tuning=gdb -resource-dir /usr/lib/clang/8.0.1
-I/opt/intel/composerxe/linux/mkl/include -internal-isystem
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/9.2.1/../../../../include/c++/9.2.1
-internal-isystem
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/9.2.1/../../../../include/c++/9.2.1/x86_64-pc-linux-gnu
-internal-isystem
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/9.2.1/../../../../include/c++/9.2.1/backward
-internal-isystem /usr/local/include -internal-isystem
/usr/lib/clang/8.0.1/include -internal-externc-isystem /include
-internal-externc-isystem /usr/include -fdeprecated-macro
-fdebug-compilation-dir /home/steven/tmp -ferror-limit 19 -fmessage-length 188
-stack-protector 2 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -triple
i386-pc-windows-msvc19.16.27032 -o /tmp/evil-70df75.o -x c++ evil.cpp -faddrsig
1.      <eof> parser at end of file
2.      Per-file LLVM IR generation
 #0 0x00007f4a07702afb llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/bin/../lib/libLLVM-8.so+0xb71afb)
 #1 0x00007f4a07700d84 llvm::sys::RunSignalHandlers()
(/usr/bin/../lib/libLLVM-8.so+0xb6fd84)
 #2 0x00007f4a07700f16 (/usr/bin/../lib/libLLVM-8.so+0xb6ff16)
 #3 0x00007f4a06804710 __restore_rt (/usr/bin/../lib/libc.so.6+0x3a710)
 #4 0x00007f4a0786f623 llvm::Value::getContext() const
(/usr/bin/../lib/libLLVM-8.so+0xcde623)
 #5 0x00007f4a07870fab llvm::ValueHandleBase::AddToUseList()
(/usr/bin/../lib/libLLVM-8.so+0xcdffab)
 #6 0x00007f4a08047ef8 llvm::CloneFunctionInto(llvm::Function*, llvm::Function
const*, llvm::ValueMap<llvm::Value const*, llvm::WeakTrackingVH,
llvm::ValueMapConfig<llvm::Value const*, llvm::sys::SmartMutex<false> > >&,
bool, llvm::SmallVectorImpl<llvm::ReturnInst*>&, char const*,
llvm::ClonedCodeInfo*, llvm::ValueMapTypeRemapper*, llvm::ValueMaterializer*)
(/usr/bin/../lib/libLLVM-8.so+0x14b6ef8)
 #7 0x00007f4a0804984e llvm::CloneFunction(llvm::Function*,
llvm::ValueMap<llvm::Value const*, llvm::WeakTrackingVH,
llvm::ValueMapConfig<llvm::Value const*, llvm::sys::SmartMutex<false> > >&,
llvm::ClonedCodeInfo*) (/usr/bin/../lib/libLLVM-8.so+0x14b884e)
 #8 0x000055a7dec238b7
clang::CodeGen::CodeGenFunction::GenerateVarArgsThunk(llvm::Function*,
clang::CodeGen::CGFunctionInfo const&, clang::GlobalDecl, clang::ThunkInfo
const&) (/usr/bin/clang-8+0x5e58b7)
 #9 0x000055a7dec27029
clang::CodeGen::CodeGenVTables::maybeEmitThunk(clang::GlobalDecl,
clang::ThunkInfo const&, bool) (/usr/bin/clang-8+0x5e9029)
#10 0x000055a7dec2765c
clang::CodeGen::CodeGenVTables::addVTableComponent(clang::CodeGen::ConstantArrayBuilder&,
clang::VTableLayout const&, unsigned int, llvm::Constant*, unsigned int&)
(/usr/bin/clang-8+0x5e965c)
#11 0x000055a7dec277b7
clang::CodeGen::CodeGenVTables::createVTableInitializer(clang::CodeGen::ConstantStructBuilder&,
clang::VTableLayout const&, llvm::Constant*) (/usr/bin/clang-8+0x5e97b7)
#12 0x000055a7ded053fd (/usr/bin/clang-8+0x6c73fd)
#13 0x000055a7dec2875c clang::CodeGen::CodeGenModule::EmitDeferredVTables()
(/usr/bin/clang-8+0x5ea75c)
#14 0x000055a7dec9888c clang::CodeGen::CodeGenModule::EmitDeferred()
(/usr/bin/clang-8+0x65a88c)
#15 0x000055a7dec989d6 clang::CodeGen::CodeGenModule::Release()
(/usr/bin/clang-8+0x65a9d6)
#16 0x000055a7df300f2b (/usr/bin/clang-8+0xcc2f2b)
#17 0x000055a7df2ff827 (/usr/bin/clang-8+0xcc1827)
#18 0x000055a7dfb0c409 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/bin/clang-8+0x14ce409)
#19 0x000055a7df2fea1e clang::CodeGenAction::ExecuteAction()
(/usr/bin/clang-8+0xcc0a1e)
#20 0x000055a7df0ea356 clang::FrontendAction::Execute()
(/usr/bin/clang-8+0xaac356)
#21 0x000055a7df0a2139
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/bin/clang-8+0xa64139)
#22 0x000055a7df1b0529
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/bin/clang-8+0xb72529)
#23 0x000055a7deb3b8f9 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/bin/clang-8+0x4fd8f9)
#24 0x000055a7deb37ab2 main (/usr/bin/clang-8+0x4f9ab2)
#25 0x00007f4a067f0d43 __libc_start_main (/usr/bin/../lib/libc.so.6+0x26d43)
#26 0x000055a7deb391be _start (/usr/bin/clang-8+0x4fb1be)
clang-8: error: unable to execute command: Segmentation fault (core dumped)
clang-8: error: clang frontend command failed due to signal (use -v to see
invocation)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>