On Fri, 24 Apr 2015 00:06:46 +0200, Jeff Law wrote: > On 04/18/2015 04:19 AM, Jan Kratochvil wrote: > > Instead of current: > > plugin_build_record_type: > > record_type = make_node (RECORD_TYPE) > > plugin_build_add_field: > > add fields to record_type... But there is no > > qualified_record_type here! > > plugin_finish_record_or_union: > > TYPE_SIZE (record_type) etc. ... to finish the type > > plugin_build_qualified_type: > > qualified_record_type = build_qualified_type (record_type, ...) [...] > I'm a bit surprised the former didn't work,
build_qualified_type() will make a copy of the type being created. While the original type gets finished later (added more fields and its final TYPE_SIZE) the copy remains unfinished forever and GCC later crashes trying to access the unfinished copy. > but if the latter is working consistently, then I'd stick with it. Yes, it is solved now. Jan