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

Kevin Puetz <puetzk at puetzk dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |puetzk at puetzk dot org

--- Comment #6 from Kevin Puetz <puetzk at puetzk dot org> ---
Possibly r263660/ea379c9ec3776b9d4f72d5d8c8987e2e43c7baae? 
add_bound_info (subrange_die, DW_AT_upper_bound) eventually calls the
add_scalar_info() that was changed in that patch. And it at least seems
plausible that the changes around decl_die = lookup_decl_die(decl)` could be
relevant.

https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff;f=gcc/dwarf2out.c;h=b80c909e1fc6b05c35faa30a72e262a08cc7d65e;hp=236f199afcf050957639f1cce839f870a0d472c6;hb=ea379c9ec3776b9d4f72d5d8c8987e2e43c7baae;hpb=3fb558b154f795983ae6a9dd6478e18a2c846584

The new code requires that decl_die have  DW_AT_location or DW_AT_const_value
in order to take the early return, and the first decl (the `extern` with
DW_AT_external = yes) has neither. So that would help the function *not* just
reference the extern and return early, thus eventually writing the complete
DW_TAG_array_type too.

I don't know this code well, haven't actually bisected, and this isn't actually
an LTO case that patch's comment describes... but it seems to be in the right
timeframe and changing relevant parts of dwarf2out.c

Reply via email to