Commit 8ae261c0 by Jakub Jelinek Committed by Jakub Jelinek

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
parent 28619cd7
2016-08-15 Jakub Jelinek <jakub@redhat.com>
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.
2016-08-15 Eric Botcazou <ebotcazou@adacore.com>
* doc/install.texi (*-*-solaris2*): Fix version number and document
......
2016-08-15 Jakub Jelinek <jakub@redhat.com>
PR debug/71906
* 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.
2016-08-14 Chung-Lin Tang <cltang@codesourcery.com>
PR fortran/70598
......
......@@ -1676,26 +1676,23 @@ gfc_get_symbol_decl (gfc_symbol * sym)
&& !(sym->attr.use_assoc && !intrinsic_array_parameter)))
gfc_defer_symbol_init (sym);
/* Associate names can use the hidden string length variable
of their associated target. */
if (sym->ts.type == BT_CHARACTER
&& TREE_CODE (length) != INTEGER_CST)
{
gfc_finish_var_decl (length, sym);
gcc_assert (!sym->value);
}
gfc_finish_var_decl (decl, sym);
if (sym->ts.type == BT_CHARACTER)
{
/* Character variables need special handling. */
gfc_allocate_lang_decl (decl);
/* Associate names can use the hidden string length variable
of their associated target. */
if (TREE_CODE (length) != INTEGER_CST)
{
gfc_finish_var_decl (length, sym);
gcc_assert (!sym->value);
}
}
/* Character variables need special handling. */
gfc_allocate_lang_decl (decl);
else if (sym->attr.subref_array_pointer)
{
/* We need the span for these beasts. */
gfc_allocate_lang_decl (decl);
}
/* We need the span for these beasts. */
gfc_allocate_lang_decl (decl);
if (sym->attr.subref_array_pointer)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment