Fix crash of -fdump-ada-spec in a pathological case
gcc/c-family/ PR ada/113397 * c-ada-spec.cc (check_type_name_conflict): Add guard for the presence of DECL_NAME on a TYPE_DECL.
This commit is contained in:
parent
1251d3957d
commit
cf420e7b98
1 changed files with 2 additions and 0 deletions
|
@ -1566,6 +1566,8 @@ check_type_name_conflict (pretty_printer *buffer, tree t)
|
|||
s = "";
|
||||
else if (TREE_CODE (TYPE_NAME (tmp)) == IDENTIFIER_NODE)
|
||||
s = IDENTIFIER_POINTER (TYPE_NAME (tmp));
|
||||
else if (!DECL_NAME (TYPE_NAME (tmp)))
|
||||
s = "";
|
||||
else
|
||||
s = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (tmp)));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue