[llvm-bugs] [Bug 47338] New: "fragment covers entire variable" verifier error in Windows thinlto builds
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Aug 27 17:45:53 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=47338
Bug ID: 47338
Summary: "fragment covers entire variable" verifier error in
Windows thinlto builds
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: akhuang at google.com
CC: llvm-bugs at lists.llvm.org
We ran into this error in chromium thinlto builds on windows, with
-debug-info-kind=constructor enabled. With -debug-info-kind=constructor, more
class types are not defined in the debug info and don't have sizes.
Here's a reduced repro that shows the fragment being emitted (for C.a_, I
think). The verifier error only happens with thinlto, because the assert isn't
called if the var size doesn't exist (during thinlto the complete type is
probably pulled from somewhere else).
$ cat t.cpp
// With ctor homing, this struct is not defined in the debug info, so it
doesn't have a size.
struct A {
A();
int i;
};
struct B {
virtual void f();
};
struct C {
C(A a, B a) : a_(a), b_(b) {}
A a_;
B b_;
};
C CodeFactory() {
A a;
return C(a, B{});
}
$ clang -cc1 -triple i386-windows-msvc -O2 -debug-info-kind=constructor -o t.ll
t.cpp
I fixed a similar issue in `transferSRADebugInfo` by not getting the size from
the DI type (https://reviews.llvm.org/D85572), but not sure if I can do the
same thing here.
--
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/20200828/58a7bfae/attachment.html>
More information about the llvm-bugs
mailing list