[LLVMbugs] [Bug 3237] New: llvm-debug breaks on enums for which TREE_CHAIN is null
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Fri Dec 19 08:49:23 PST 2008
http://llvm.org/bugs/show_bug.cgi?id=3237
Summary: llvm-debug breaks on enums for which TREE_CHAIN is null
Product: new-bugs
Version: unspecified
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: baldrick at free.fr
CC: llvmbugs at cs.uiuc.edu
This fired when compiling Ada with -g on this type:
<enumeral_type 0xf7b58780 ada__command_line__arg_nums___XUA type_4 VOID
align 8 symtab 7 alias set -1 precision 0
LLVM: %enum.ada__command_line__arg_nums___XUA
pointer_to_this <pointer_type 0xf7b587e0>>
The code that barfs is:
case ENUMERAL_TYPE: {
// enum { a, b, ..., z };
llvm::SmallVector<llvm::DIDescriptor, 32> Elements;
if (TYPE_SIZE(type)) {
for (tree Link = TYPE_VALUES(type); Link; Link = TREE_CHAIN(Link)) {
tree EnumValue = TREE_VALUE(Link);
int64_t Value = getInt64(EnumValue, tree_int_cst_sgn(EnumValue) > 0);
const char *EnumName = IDENTIFIER_POINTER(TREE_PURPOSE(Link));
Elements.push_back(DebugFactory.CreateEnumerator(EnumName, Value));
}
}
llvm::DIArray EltArray =
DebugFactory.GetOrCreateArray(&Elements[0], Elements.size());
expanded_location Loc = GetNodeLocation(TREE_CHAIN(type), false);
The problem is that TREE_CHAIN(type) is null. Not sure what this code
expects TREE_CHAIN to give? Anyway, the Ada type is a dummy introduced
by the front-end and as such has no location etc.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list