<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 - Compile error due to mismatch in cached linkage (related to c++20 modules)"
   href="https://bugs.llvm.org/show_bug.cgi?id=45075">45075</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Compile error due to mismatch in cached linkage (related to c++20 modules)
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </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>C++2a
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>aanton.rv@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=23193" name="attach_23193" title="Library interface and and main call site.">attachment 23193</a> <a href="attachment.cgi?id=23193&action=edit" title="Library interface and and main call site.">[details]</a></span>
Library interface and and main call site.

The bug is related to compilation of template functions in public and private
parts of a C++20 module.

The following assertion fails:

clang++: /home/anton/llvm-project/clang/lib/AST/Decl.cpp:1472:
clang::LinkageInfo clang::LinkageComputer::getLVForDecl(const
clang::NamedDecl*, clang::LVComputationKind): Assertion `D->getCachedLinkage()
== LV.getLinkage()' failed.


After the following compilation steps:

clang++ -std=c++2a -fmodules --precompile lib.cppm;
clang++ -std=c++2a -fmodules main.cpp -fmodule-file=lib.pcm -o m;

Files are attached.

The bug can be skipped if the definition of call() function in detail namespace
is also exported, however it should not be to keep public and private library
parts well separated.</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>