GCC Bugzilla – Bug 54809
gengtype ignore mark_hook in struct nested in union
Last modified: 2012-10-04 08:11:01 UTC
Created attachment 28353 [details]
small example to feed to gengtype
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
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)