Created attachment 28353 [details] small example to feed to gengtype See http://gcc.gnu.org/ml/gcc-patches/2012-10/msg00257.html The attached basilemarkh.h contains a GTY-ed struct mytest_st with a mark_hook. That struct mytest_st is a member of some GTY-ed union myutest_un. No call to the mark_hook is generated by gengtype (both on GCC 4.7 and on 4.8 trunk). The attached patch to gengtype.c (for GCC 4.8 trunk svn rev 192031) solves the issue
Created attachment 28354 [details] patch to gengtype.c
Run gengtype -D -v \ -r gtype.state \ -P _g-basilemarkh.h basilemarkh.h The bug appears on GCC 4.6, GCC 4.7 and GCC 4.8 (trunk svn rev 192031)
Author: tbsaunde Date: Wed Jan 13 02:51:11 2016 New Revision: 232309 URL: https://gcc.gnu.org/viewcvs?rev=232309&root=gcc&view=rev Log: remove mark_hook gty attribute gcc/ChangeLog: 2016-01-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> PR middle-end/54809 * doc/gty.texi: Remove documentation of mark_hook. * gengtype.c (struct write_types_data): Remove code to support mark_hook attribute. (walk_type): Likewise. (write_func_for_structure): Likewise. Modified: trunk/gcc/ChangeLog trunk/gcc/doc/gty.texi trunk/gcc/gengtype.c
Can the bug be marked as resolved?