On Thu, Nov 3, 2016 at 12:38 PM, Jakub Jelinek <ja...@redhat.com> wrote: > On Wed, Nov 02, 2016 at 01:19:09PM -0400, Jason Merrill wrote: >> On Wed, Nov 2, 2016 at 12:33 PM, Jakub Jelinek <ja...@redhat.com> wrote: >> > On Wed, Nov 02, 2016 at 04:44:05PM +0100, Jakub Jelinek wrote: >> >> which means if gen_type_die or gen_type_die_with_usage doesn't >> >> use the langhook, then we'd emit a completely useless { __pfn; __delta } >> >> struct into debug info first, and then in modified_type_die used >> >> the langhook, get OFFSET_TYPE and probably create the >> >> DW_TAG_ptr_to_member_type. So I think we really need that. >> >> >> >> > > 2) it is used for something Ada-ish I really don't know how to test >> >> > > etc. >> >> > > to be able to find out if it is safe to call it in >> >> > > gen_type_die_with_usage too >> >> > >> >> > You could find an Ada test that uses the code and verify that the >> >> > output stays the same? >> >> >> >> I can try to find the patch that introduced it and if it contained any >> >> testcases. >> > >> > I couldn't find any unfortunately. Pierre, could you please test if the >> > following patch doesn't regress anything in the Ada debug info area? >> > >> > Here is updated patch I'm going to bootstrap/regtest; it generates the >> > same debuginfo on ref-3.C testcase. >> >> Looks good. > > Keith's testing revealed a bug in the patch, that we don't emit > DW_TAG_typedef for PMF typedefs. Fixed by adding && !typedef_variant_p (type) > check to the cp_get_debug_type hook, so that we emit the proper typedef > with the right name and only its DECL_ORIGINAL_TYPE is replaced with > OFFSET_TYPE handling. I believe that was the only issue, so I think it > should be ok to enable it always, not just for -gdwarf-5. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
I checked in the hunks introducing check_lang_type separately; the rest is OK. Jason