mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-25 05:40:26 +08:00
PR c++/51043 - ICE in LTO
* cp-tree.h (TYPE_ALIAS_P, TYPE_TEMPLATE_INFO): Don't crash on NULL TYPE_NAME. From-SVN: r181231
This commit is contained in:
parent
e7a82751a5
commit
5cc66776c4
@ -41,6 +41,10 @@
|
||||
|
||||
2011-11-09 Dodji Seketeli <dodji@redhat.com>
|
||||
|
||||
PR c++/51043
|
||||
* cp-tree.h (TYPE_ALIAS_P, TYPE_TEMPLATE_INFO): Don't crash on
|
||||
NULL TYPE_NAME.
|
||||
|
||||
PR c++/51027
|
||||
* parser.c (cp_parser_alias_declaration): Require ';' at the end
|
||||
of the declaration.
|
||||
|
@ -2550,8 +2550,9 @@ extern void decl_shadowed_for_var_insert (tree, tree);
|
||||
/* Nonzero for a type which is an alias for another type; i.e, a type
|
||||
which declaration was written 'using name-of-type =
|
||||
another-type'. */
|
||||
#define TYPE_ALIAS_P(NODE) \
|
||||
(TYPE_P (NODE) \
|
||||
#define TYPE_ALIAS_P(NODE) \
|
||||
(TYPE_P (NODE) \
|
||||
&& TYPE_NAME (NODE) \
|
||||
&& TYPE_DECL_ALIAS_P (TYPE_NAME (NODE)))
|
||||
|
||||
/* For a class type: if this structure has many fields, we'll sort them
|
||||
@ -2605,15 +2606,15 @@ extern void decl_shadowed_for_var_insert (tree, tree);
|
||||
->template_info)
|
||||
|
||||
/* Template information for an ENUMERAL_, RECORD_, or UNION_TYPE. */
|
||||
#define TYPE_TEMPLATE_INFO(NODE) \
|
||||
(TREE_CODE (NODE) == ENUMERAL_TYPE \
|
||||
? ENUM_TEMPLATE_INFO (NODE) : \
|
||||
(TREE_CODE (NODE) == BOUND_TEMPLATE_TEMPLATE_PARM \
|
||||
? TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (NODE) : \
|
||||
((CLASS_TYPE_P (NODE) && !TYPE_ALIAS_P (NODE)) \
|
||||
? CLASSTYPE_TEMPLATE_INFO (NODE) \
|
||||
: (DECL_LANG_SPECIFIC (TYPE_NAME (NODE)) \
|
||||
? (DECL_TEMPLATE_INFO (TYPE_NAME (NODE))) \
|
||||
#define TYPE_TEMPLATE_INFO(NODE) \
|
||||
(TREE_CODE (NODE) == ENUMERAL_TYPE \
|
||||
? ENUM_TEMPLATE_INFO (NODE) : \
|
||||
(TREE_CODE (NODE) == BOUND_TEMPLATE_TEMPLATE_PARM \
|
||||
? TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (NODE) : \
|
||||
((CLASS_TYPE_P (NODE) && !TYPE_ALIAS_P (NODE)) \
|
||||
? CLASSTYPE_TEMPLATE_INFO (NODE) \
|
||||
: ((TYPE_NAME (NODE) && DECL_LANG_SPECIFIC (TYPE_NAME (NODE))) \
|
||||
? (DECL_TEMPLATE_INFO (TYPE_NAME (NODE))) \
|
||||
: NULL_TREE))))
|
||||
|
||||
/* Set the template information for an ENUMERAL_, RECORD_, or
|
||||
|
Loading…
x
Reference in New Issue
Block a user