https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78235

--- Comment #5 from David Edelsohn <dje at gcc dot gnu.org> ---
This fails in dbxout.c:dbxout_type_fields()

  /* Output the name, type, position (in bits), size (in bits) of each
     field that we can support.  */
  for (tem = TYPE_FIELDS (type); tem; tem = DECL_CHAIN (tem))
     ...
          if (VAR_P (tem))
            {
             ...
             }
          else
            {
              stabstr_C (',');
              stabstr_D (int_bit_position (tem));
              stabstr_C (',');
              stabstr_D (tree_to_uhwi (DECL_SIZE (tem)));
              stabstr_C (';');
            }

tem is a TEMPLATE_DECL. It is occuring under the case for RECORD_TYPE,
UNION_TYPE and QUAL_UNION_TYPE.

Another part of dbxout.c states

          /* Skip methods that aren't FUNCTION_DECLs.  (In C++, these
             include TEMPLATE_DECLs.)  The debugger doesn't know what
             to do with such entities anyhow.  */

so I'm tempted to fix this by ignoring TEMPLATE_DECLs for in this logic as
well.

Reply via email to