User account creation filtered due to spam.

Bug 54809 - gengtype ignore mark_hook in struct nested in union
Summary: gengtype ignore mark_hook in struct nested in union
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-04 08:04 UTC by Basile Starynkevitch
Modified: 2016-01-13 02:51 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
small example to feed to gengtype (249 bytes, text/x-chdr)
2012-10-04 08:04 UTC, Basile Starynkevitch
Details
patch to gengtype.c (437 bytes, patch)
2012-10-04 08:05 UTC, Basile Starynkevitch
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Basile Starynkevitch 2012-10-04 08:04:18 UTC
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
Comment 1 Basile Starynkevitch 2012-10-04 08:05:00 UTC
Created attachment 28354 [details]
patch to gengtype.c
Comment 2 Basile Starynkevitch 2012-10-04 08:09:42 UTC
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)
Comment 3 tbsaunde 2016-01-13 02:51:43 UTC
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