https://bugs.llvm.org/show_bug.cgi?id=35247
Bug ID: 35247
Summary: [ThinLTO] Assertion `!Ty->isFunctionTy() &&
PointerType::isValidElementType(Ty) && "invalid type
for global variable"' failed.
Product: new-bugs
Version: 5.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedb...@nondot.org
Reporter: russell_gal...@sn.scee.net
CC: llvm-bugs@lists.llvm.org
Tested at r316607 on release_50.
==> a.cpp <==
int* A();
int main() {
int* s(A());
}
==> b.cpp <==
struct SF {
SF();
};
SF::SF() {}
SF* A() {
new SF();
}
$ clang -o a.o -flto=thin -c a.cpp
$ clang -o b.o -flto=thin -c b.cpp
$ llvm-lto a.o b.o --thinlto-action=run
llvm-lto: .../llvm/lib/IR/Globals.cpp:317:
llvm::GlobalVariable::GlobalVariable(llvm::Module&, llvm::Type*, bool,
llvm::GlobalValue::LinkageTypes, llvm::Constant*, const llvm::Twine&,
llvm::GlobalVariable*, llvm::GlobalValue::ThreadLocalMode, unsigned int, bool):
Assertion `!Ty->isFunctionTy() && PointerType::isValidElementType(Ty) &&
"invalid type for global variable"' failed.
Not seen on master (r317500).
Note that there are multiple versions of A() in this example. With this fixed,
there is no assertion failure.
--
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