[Bug fortran/92775] [8/9/10 Regression] Incorrect expression in DW_AT_byte_stride on an array
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Dec 5 11:04:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92775
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 47426
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47426&action=edit
gcc10-pr92775.patch
Untested fix. Unfortunately, this regresses debug info size a little bit for
the common case where we know the span field in the descriptor is constant
equal to TYPE_SIZE_UNIT (etype), previously we used at least for sizes 1 to 31
DW_OP_litN, which is 1 byte long, and now we need to use 4 bytes -
DW_OP_push_object_address, DW_OP_plus_uconst, 32 (or 20 for ilp32),
DW_OP_deref.
It would be helpful if TYPE_LANG_SPECIFIC could contain some flag whether the
span field needs to be used or not, like in the past one could test
GFC_TYPE_ARRAY_SPAN (type) != NULL_TREE. If the FE provides something, the
debug hook can be adjusted to use the base->span only if really needed and
TYPE_SIZE_UNIT (etype) otherwise.
More information about the Gcc-bugs
mailing list