On Tue, Jan 23, 2018 at 4:02 PM, Yao Qi <qiyao...@gmail.com> wrote: > > Hi, > I observed that gfortran 7.2 and 8.0 generate different debug info for > dynamical array.
> Attributes DW_AT_data_location and DW_AT_allocated are different. There > is an extra "DW_OP_plus_uconst: 8" generated by gcc 8.0. Is it > intended or expected? gfortran 8.0 causes many gdb.fotran vla-related > tests fail, but gfortran 7.2 doesn't. That is why I took a look at the > debug information. > I did 'git bisect', and find the following commit causes the change in the debug information. Paul, do you have any clue on the different debug information caused by your commit? commit c0dbf68e8b1cf24bd54de0c3b6ec056436f174ac Author: pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Sun Sep 10 17:02:53 2017 +0000 2017-09-10 Paul Thomas <pa...@gcc.gnu.org> PR fortran/34640 PR fortran/40737 PR fortran/55763 PR fortran/57019 PR fortran/57116 * expr.c (is_subref_array): Add class pointer array dummies to the list of expressions that return true. * trans-array.c: Add SPAN_FIELD and update indices for subsequent fields. (gfc_conv_descriptor_span, gfc_conv_descriptor_span_get, gfc_conv_descriptor_span_set, is_pointer_array, get_array_span): New functions. (gfc_get_descriptor_offsets_for_info): New function to preserve API for access to descriptor fields for trans-types.c. (gfc_conv_scalarized_array_ref): If the expression is a subref array, make sure that info->descriptor is a descriptor type. Otherwise, if info->descriptor is a pointer array, set 'decl' and fix it if it is a component reference. (build_array_ref): Simplify handling of class array refs by passing the vptr to gfc_build_array_ref rather than generating the pointer arithmetic in this function. (gfc_conv_array_ref): As in gfc_conv_scalarized_array_ref, set 'decl'. (gfc_array_allocate): Set the span field if this is a pointer array. Use the expr3 element size if it is available, so that the dynamic type element size is used. (gfc_conv_expr_descriptor): Set the span field for pointer assignments. -- Yao (齐尧)