On Mon, 16 Oct 2017, Nathan Sidwell wrote: > On 10/16/2017 02:49 AM, Richard Biener wrote: > > On October 13, 2017 8:29:40 PM GMT+02:00, Nathan Sidwell <nat...@acm.org> > > wrote: > > > > I intend to continue cleaning this up of course. It's not clear to me > > > whether we should cache these node sizes in an array, and the way it > > > goes about checking nodes with nested switches is understandable, but > > > possible not the fastest solution. However let's at least get the > > > sizing > > > right first. > > > > We were conservative exactly to avoid the langhook here. I think there's > > similar 'bug' on the decl side. > > The other code types (decls, exprs, etc) call the langhook. tcc_type seems > the exception (now?).
Sorry for not looking at the patch before replying. The patch looks ok but shouldn't LANG_TYPE be also handled by the FE? LANG_TYPE itself is an odd beast if I may say that - it's only used by the C++ and Ada FEs and the Ada FE does only /* Make a dummy type corresponding to GNAT_TYPE. */ tree make_dummy_type (Entity_Id gnat_type) { ... /* Create a debug type so that debug info consumers only see an unspecified type. */ if (Needs_Debug_Info (gnat_type)) { debug_type = make_node (LANG_TYPE); SET_TYPE_DEBUG_TYPE (gnu_type, debug_type); TYPE_NAME (debug_type) = TYPE_NAME (gnu_type); TYPE_ARTIFICIAL (debug_type) = TYPE_ARTIFICIAL (gnu_type); } Thus the patch is ok. Thanks, Richard.