[LLVMbugs] [Bug 22309] New: Assertion failed: (T == dwarf::DW_TAG_typedef || ...), function isUnsignedDIType, file lib/CodeGen/AsmPrinter/DwarfUnit.cpp, line 592
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Jan 23 08:45:27 PST 2015
http://llvm.org/bugs/show_bug.cgi?id=22309
Bug ID: 22309
Summary: Assertion failed: (T == dwarf::DW_TAG_typedef || ...),
function isUnsignedDIType, file
lib/CodeGen/AsmPrinter/DwarfUnit.cpp, line 592
Product: new-bugs
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: dimitry at andric.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
I encountered this assertion during compilation of a few FreeBSD kernel sources
with clang trunk r226904:
Assertion failed: (T == dwarf::DW_TAG_typedef || T == dwarf::DW_TAG_const_type
|| T == dwarf::DW_TAG_volatile_type || T == dwarf::DW_TAG_restrict_type || T ==
dwarf::DW_TAG_enumeration_type), function isUnsignedDIType, file
lib/CodeGen/AsmPrinter/DwarfUnit.cpp, line 592.
At that point, T has the value DW_TAG_union_type (0x17), so it looks like the
test at the start of isUnsignedDIType() does not consider union types to be
aggregate types:
// (Pieces of) aggregate types that get hacked apart by SROA may also be
// represented by a constant. Encode them as unsigned bytes.
// FIXME: reference and rvalue_reference /probably/ shouldn't be allowed
// here, but accept them for now due to a bug in SROA producing bogus
// dbg.values.
if (T == dwarf::DW_TAG_array_type ||
T == dwarf::DW_TAG_class_type ||
T == dwarf::DW_TAG_pointer_type ||
T == dwarf::DW_TAG_ptr_to_member_type ||
T == dwarf::DW_TAG_reference_type ||
T == dwarf::DW_TAG_rvalue_reference_type ||
T == dwarf::DW_TAG_structure_type)
return true;
I'm not sure, but maybe DW_TAG_union_type should be added to this test.
Here is a reduced test case to show the problem:
============================================================
union mfi_evt {
struct {
int reserved;
} members;
} mfi_aen_setup() {
union mfi_evt a;
a.members.reserved = 0;
}
============================================================
Compile with "clang -O1 -g -c" to get the assertion.
--
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/20150123/490b1da5/attachment.html>
More information about the llvm-bugs
mailing list