Commit f51d8f1a by Jakub Jelinek Committed by Jakub Jelinek

dwarf2out.c (gen_formal_parameter_die, [...]): For DECL_BY_REFERENCE decls don't…

dwarf2out.c (gen_formal_parameter_die, [...]): For DECL_BY_REFERENCE decls don't pass TREE_READONLY and TREE_THIS_VOLATILE to...

	* dwarf2out.c (gen_formal_parameter_die, gen_variable_die): For
	DECL_BY_REFERENCE decls don't pass TREE_READONLY and
	TREE_THIS_VOLATILE to add_type_attribute.

From-SVN: r139779
parent b6b904bd
2008-08-29 Jakub Jelinek <jakub@redhat.com> 2008-08-29 Jakub Jelinek <jakub@redhat.com>
* dwarf2out.c (gen_formal_parameter_die, gen_variable_die): For
DECL_BY_REFERENCE decls don't pass TREE_READONLY and
TREE_THIS_VOLATILE to add_type_attribute.
* dwarf2out.c (add_subscript_info): Stop on Fortran TYPE_STRING_FLAG * dwarf2out.c (add_subscript_info): Stop on Fortran TYPE_STRING_FLAG
types. types.
(gen_array_type_die): Emit DW_TAG_string_type for Fortran character (gen_array_type_die): Emit DW_TAG_string_type for Fortran character
......
...@@ -13023,11 +13023,13 @@ gen_formal_parameter_die (tree node, dw_die_ref context_die) ...@@ -13023,11 +13023,13 @@ gen_formal_parameter_die (tree node, dw_die_ref context_die)
tree type = TREE_TYPE (node); tree type = TREE_TYPE (node);
add_name_and_src_coords_attributes (parm_die, node); add_name_and_src_coords_attributes (parm_die, node);
if (DECL_BY_REFERENCE (node)) if (DECL_BY_REFERENCE (node))
type = TREE_TYPE (type); add_type_attribute (parm_die, TREE_TYPE (type), 0, 0,
add_type_attribute (parm_die, type, context_die);
TREE_READONLY (node), else
TREE_THIS_VOLATILE (node), add_type_attribute (parm_die, type,
context_die); TREE_READONLY (node),
TREE_THIS_VOLATILE (node),
context_die);
if (DECL_ARTIFICIAL (node)) if (DECL_ARTIFICIAL (node))
add_AT_flag (parm_die, DW_AT_artificial, 1); add_AT_flag (parm_die, DW_AT_artificial, 1);
} }
...@@ -13704,14 +13706,15 @@ gen_variable_die (tree decl, dw_die_ref context_die) ...@@ -13704,14 +13706,15 @@ gen_variable_die (tree decl, dw_die_ref context_die)
else else
{ {
tree type = TREE_TYPE (decl); tree type = TREE_TYPE (decl);
add_name_and_src_coords_attributes (var_die, decl);
if ((TREE_CODE (decl) == PARM_DECL if ((TREE_CODE (decl) == PARM_DECL
|| TREE_CODE (decl) == RESULT_DECL) || TREE_CODE (decl) == RESULT_DECL)
&& DECL_BY_REFERENCE (decl)) && DECL_BY_REFERENCE (decl))
type = TREE_TYPE (type); add_type_attribute (var_die, TREE_TYPE (type), 0, 0, context_die);
else
add_name_and_src_coords_attributes (var_die, decl); add_type_attribute (var_die, type, TREE_READONLY (decl),
add_type_attribute (var_die, type, TREE_READONLY (decl), TREE_THIS_VOLATILE (decl), context_die);
TREE_THIS_VOLATILE (decl), context_die);
if (TREE_PUBLIC (decl)) if (TREE_PUBLIC (decl))
add_AT_flag (var_die, DW_AT_external, 1); add_AT_flag (var_die, DW_AT_external, 1);
......
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