gcc/
* gengtype.c (create_user_defined_type): Ensure that the kind
is set to TYPE_USER_STRUCT, fixing a bug seen when an incomplete
declaration is seen before the GTY((user)) marking.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201791
138bc75d-0d04-0410-961f-
82ee72b054a4
+2013-08-16 David Malcolm <dmalcolm@redhat.com>
+
+ * gengtype.c (create_user_defined_type): Ensure that the kind
+ is set to TYPE_USER_STRUCT, fixing a bug seen when an incomplete
+ declaration is seen before the GTY((user)) marking.
+
2013-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR target/58105
create_user_defined_type (const char *type_name, struct fileloc *pos)
{
type_p ty = find_structure (type_name, TYPE_USER_STRUCT);
+
+ /* We might have already seen an incomplete decl of the given type,
+ in which case we won't have yet seen a GTY((user)), and the type will
+ only have kind "TYPE_STRUCT". Mark it as a user struct. */
+ ty->kind = TYPE_USER_STRUCT;
+
ty->u.s.line = *pos;
ty->u.s.bitmap = get_lang_bitmap (pos->file);
do_typedef (type_name, ty, pos);