re PR debug/71906 (Fortran allocatable strings debug info type size regression)
authorJakub Jelinek <jakub@redhat.com>
Mon, 15 Aug 2016 09:50:33 +0000 (11:50 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 15 Aug 2016 09:50:33 +0000 (11:50 +0200)
commit8ae261c007a5cdb70d1115d0195c32659561115f
tree081e5d0d4e40144ee0cd92dbd5c087ccd07cebd2
parent28619cd767c281af7ce543925d4212d843a09de8
re PR debug/71906 (Fortran allocatable strings debug info type size regression)

PR debug/71906
* dwarf2out.c (string_types): New variable.
(gen_array_type_die): Change early_dwarf handling of
DW_AT_string_length, create DW_OP_call4 referencing the
length var temporarily.  Handle parameters that are pointers
to string length.
(adjust_string_types): New function.
(gen_subprogram_die): Temporarily set string_types to local var,
call adjust_string_types if needed.
(non_dwarf_expression, copy_deref_exprloc, optimize_string_length):
New functions.
(resolve_addr): Adjust DW_AT_string_length if it is DW_OP_call4.

* trans-decl.c (gfc_get_symbol_decl): Call gfc_finish_var_decl
for decl's character length before gfc_finish_var_decl on the
decl itself.

From-SVN: r239469
gcc/ChangeLog
gcc/dwarf2out.c
gcc/fortran/ChangeLog
gcc/fortran/trans-decl.c