[llvm-bugs] [Bug 36089] New: [ThinLTO] asserts `!(Pair.first != Ty && Pair.second == Ty) && "mapping to a source type"` failed

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jan 25 08:48:04 PST 2018


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

            Bug ID: 36089
           Summary: [ThinLTO] asserts `!(Pair.first != Ty && Pair.second
                    == Ty) && "mapping to a source type"` failed
           Product: libraries
           Version: 6.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Linker
          Assignee: unassignedbugs at nondot.org
          Reporter: russell_gallop at sn.scee.net
                CC: llvm-bugs at lists.llvm.org

This seems related to PR37522 but wasn't fixed by r322103.

At r323433:
$ clang --version
clang version 7.0.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
...

$ cat a.cpp
void foo() {}
$ cat b.cpp
struct B;
struct C {
  C(B &);
};
struct A &fn1() {}
C::C(B &) {}
$ cat c.cpp
struct A &foo();
template <A &() = foo> struct D {};
struct B {
  B(A &);
  D<> m_list;
};
struct C {
  C(B &);
};
void bar() {
  B b(foo());
  C c(b);
}
$ clang -c -O1 -g -flto=thin a.cpp
$ clang -c -O1 -g -flto=thin b.cpp
b.cpp:5:18: warning: control reaches end of non-void function [-Wreturn-type]
struct A &fn1() {}
                 ^
1 warning generated.
$ clang -c -O1 -g -flto=thin c.cpp
$ llvm-lto -thinlto-action=run a.o b.o c.o
llvm-lto: /home/user/git/llvm/lib/Linker/IRMover.cpp:248: llvm::Type*
{anonymous}::TypeMapTy::get(llvm::Type*, llvm::SmallPtrSet<llvm::StructType*,
8u>&): Assertion
`!(Pair.first != Ty && Pair.second == Ty) && "mapping to a source type"'
failed.
...

-- 
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/20180125/0a8fdddd/attachment.html>


More information about the llvm-bugs mailing list