<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 - Regression(357610): Assertion `COMDATKey' failed for"
   href="https://bugs.llvm.org/show_bug.cgi?id=41471">41471</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Regression(357610): Assertion `COMDATKey' failed for
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>LLVM Codegen
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>nicolasweber@gmx.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat angle_deqp_gtest-d421b0.reduced.cpp 
class a {
public:
  a();
};
namespace {
template <size_t> class aj {
public:
  static a al;
};
template <size_t am> a aj<am>::al;
class b : aj<3> {
  void c();
};
void b::c() { al; }
} // namespace


$ cat angle_deqp_gtest-d421b0.reduced.sh 
out/gn/bin/clang -cc1 -triple i386-pc-windows-msvc19.11.0 -fms-compatibility
-emit-llvm angle_deqp_gtest-d421b0.reduced.cpp



angle_deqp_gtest-d421b0.reduced.cpp:14:15: warning: expression result unused
void b::c() { al; }
              ^~
clang: ../../clang/lib/CodeGen/CGDeclCXX.cpp:487: void
clang::CodeGen::CodeGenModule::EmitCXXGlobalVarDeclInitFunc(const
clang::VarDecl *, llvm::GlobalVariable *, bool): Assertion `COMDATKey' failed.
Stack dump:
0.      Program arguments: out/gn/bin/clang -cc1 -triple
i386-pc-windows-msvc19.11.0 -fms-compatibility -emit-llvm
angle_deqp_gtest-d421b0.reduced.cpp 
1.      <eof> parser at end of file
2.      angle_deqp_gtest-d421b0.reduced.cpp:8:12: instantiating variable
definition '(anonymous namespace)::aj<3>::al'
3.      angle_deqp_gtest-d421b0.reduced.cpp:10:32: Generating code for
declaration '(anonymous namespace)::aj<3>::al'
 #0 0x0000000002717c9d PrintStackTraceSignalHandler(void*)
(out/gn/bin/clang+0x2717c9d)
 #1 0x0000000002715a3e llvm::sys::RunSignalHandlers()
(out/gn/bin/clang+0x2715a3e)
 #2 0x0000000002717e58 SignalHandler(int) (out/gn/bin/clang+0x2717e58)
 #3 0x00007f1f95a890c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x110c0)
 #4 0x00007f1f94c50fcf gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x32fcf)
 #5 0x00007f1f94c523fa abort (/lib/x86_64-linux-gnu/libc.so.6+0x343fa)
 #6 0x00007f1f94c49e37 (/lib/x86_64-linux-gnu/libc.so.6+0x2be37)
 #7 0x00007f1f94c49ee2 (/lib/x86_64-linux-gnu/libc.so.6+0x2bee2)
 #8 0x0000000001ab8620
clang::CodeGen::CodeGenFunction::GenerateCXXGlobalVarDeclInitFunc(llvm::Function*,
clang::VarDecl const*, llvm::GlobalVariable*, bool)
(out/gn/bin/clang+0x1ab8620)
 #9 0x00000000019a9ba4
clang::CodeGen::CodeGenModule::EmitGlobalVarDefinition(clang::VarDecl const*,
bool) (out/gn/bin/clang+0x19a9ba4)
#10 0x00000000019a14c9
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*) (out/gn/bin/clang+0x19a14c9)
#11 0x00000000019abcc6
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*)
(out/gn/bin/clang+0x19abcc6)
#12 0x0000000003873b57
clang::Sema::InstantiateVariableDefinition(clang::SourceLocation,
clang::VarDecl*, bool, bool, bool) (out/gn/bin/clang+0x3873b57)
#13 0x000000000387430e clang::Sema::PerformPendingInstantiations(bool)
(out/gn/bin/clang+0x387430e)
#14 0x00000000031cc68d clang::Sema::ActOnEndOfTranslationUnit()
(out/gn/bin/clang+0x31cc68d)
#15 0x00000000030f7527
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
(out/gn/bin/clang+0x30f7527)
#16 0x00000000030f3343 clang::ParseAST(clang::Sema&, bool, bool)
(out/gn/bin/clang+0x30f3343)
#17 0x0000000001e57e40 clang::FrontendAction::Execute()
(out/gn/bin/clang+0x1e57e40)
#18 0x0000000001dc3421
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(out/gn/bin/clang+0x1dc3421)
#19 0x0000000001eefd4a
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(out/gn/bin/clang+0x1eefd4a)
#20 0x00000000018d6628 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (out/gn/bin/clang+0x18d6628)
#21 0x00000000018e3ba5 main (out/gn/bin/clang+0x18e3ba5)
#22 0x00007f1f94c3e2b1 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x202b1)
#23 0x00000000018d602a _start (out/gn/bin/clang+0x18d602a)
./angle_deqp_gtest-d421b0.reduced.sh: line 2: 169750 Aborted                
out/gn/bin/clang -cc1 -triple i386-pc-windows-msvc19.11.0 -fms-compatibility
-emit-llvm angle_deqp_gtest-d421b0.reduced.cpp</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>