https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115272
--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> --- (In reply to Richard Biener from comment #2) > (In reply to Richard Biener from comment #1) > > How does it work for 'double' vs. 'long double' themselves? > > > > <1><32>: Abbrev Number: 3 (DW_TAG_base_type) > > <33> DW_AT_byte_size : 16 > > <34> DW_AT_encoding : 4 (float) > > <35> DW_AT_name : (indirect string, offset: 0x60): long double > > > > so if it's not distinguishable via DW_AT_byte_size you look into > > DW_AT_name as well? For complex types there's a need to get at the base type, for scalar types there's not, so I'm not sure I understand the question. > So it looks like doing the same for _Complex long double > > is perfectly in line? > > Take for example powerpc with it's dual IEEE and IBM long double 128 format. [ See also PR 104194. ] That's slightly different, in the sense that in this PR we're trying to distinguish the two distinct base types of two distinct types: "complex double" and "complex long double". With "dual IEEE" and "IBM long double 128 format", there's a single type, long double, that can have different formats, with different ABIs. GDB handles this distinction by looking up Tag_GNU_Power_ABI_FP in the elf file.