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: unassignedb...@nondot.org
          Reporter: russell_gal...@sn.scee.net
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to