[Bug debug/66668] [6 regression] FAIL: gcc.dg/debug/dwarf2/stacked-qualified-types-3.c scan-assembler-times DIE \\([^\n]*\\) DW_TAG_(?:const|volatile|atomic|restrict)_type 8

vogt at linux dot vnet.ibm.com gcc-bugzilla@gcc.gnu.org
Thu Jan 14 09:48:00 GMT 2016


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

--- Comment #6 from Dominik Vogt <vogt at linux dot vnet.ibm.com> ---
There are several approaches to fix the problem:

1) An "Intermediate" DIE is generated if the corresponding type has not yet
been recorded.  When creating the DIE also generate the type.  This may lead to
unused types in the list.

2) Like 1, but record the new types for "intermediate" DIEs in a separate place
so that they are not visible to the remaining code.  When the type is finally
generated, "promote" it to the real type list.

3) Store the "intermediate" DIEs in a hash table (or some other structure).  If
lookup_type_die() fails, search through the hash table for a DIE describing the
type at hand.  To do this, it is necessary to generate a unique key from a
given type (for lookup in the table).  It is also necessary to generate the
same key from a given DIE (to store a DIE without a type in the table).  (Is
the "signature" in a DIE any good for this?)  May be expensive.

4) When lookup_type_die() fails, any relevant "intermediate" DIEs have been
generated for existing types whose qualifiers are a superset of the current
type.  So, get a list of such types and recurse over all existing DIEs for
these types and check whether one of them is the one we're looking for.  May be
expensive.

Any comments or alternative solutions?


More information about the Gcc-bugs mailing list