[llvm-bugs] [Bug 45075] New: Compile error due to mismatch in cached linkage (related to c++20 modules)

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Mar 2 05:26:57 PST 2020


https://bugs.llvm.org/show_bug.cgi?id=45075

            Bug ID: 45075
           Summary: Compile error due to mismatch in cached linkage
                    (related to c++20 modules)
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++2a
          Assignee: unassignedclangbugs at nondot.org
          Reporter: aanton.rv at gmail.com
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

Created attachment 23193
  --> https://bugs.llvm.org/attachment.cgi?id=23193&action=edit
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200302/59eff513/attachment.html>


More information about the llvm-bugs mailing list