https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78191
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2016-11-03 Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 39954 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39954&action=edit gcc7-pr78191.patch The bug is specific I think just to -gdwarf-{2,3} -gno-strict-dwarf, where DW_FORM_exprloc can't be used for location expressions and some location expression contains DW_OP_GNU_{{const,regval,deref}_type,convert,reinterpret} and there are at least 128 die abbreviations used by more than one DIE. Because of the lack of DW_FORM_exprloc we need to decide on DW_FORM_block{1,2,4} and size the location expression, for that we need to know the DIE offsets of base offset DIEs that are referenced and for that their size and their abbreviation values need to be constant, so the optimize_abbrev_table opts that reorder abbreviation numbers by decreasing usage count or for -gdwarf-5 attempt to optimize implicit constants can't be done for the CU and base types. For -gdwarf-4 and above, we can emit DW_FORM_exprloc, so value_format doesn't need to compute any sizes and thus calc_base_type_die_sizes shouldn't be called.