aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-08-29 20:54:53 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2008-08-29 20:54:53 +0200
commit98c0cbd30a77148e1baa024678eeae6ff2a925c0 (patch)
tree1a8ce08cb71faa4f2128213f322d3ef68b1e336d /gcc
parentde870512b6dfd173e888bead942fe051a4c59b43 (diff)
downloadgcc-98c0cbd30a77148e1baa024678eeae6ff2a925c0.zip
gcc-98c0cbd30a77148e1baa024678eeae6ff2a925c0.tar.gz
gcc-98c0cbd30a77148e1baa024678eeae6ff2a925c0.tar.bz2
dwarf2out.c (fortran_common): Update comment.
* dwarf2out.c (fortran_common): Update comment. (gen_variable_die): Swap com_die and var_die variables in Fortran COMMON block handling code. From-SVN: r139783
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/dwarf2out.c50
2 files changed, 29 insertions, 25 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1158c2f..d326fc9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2008-08-29 Jakub Jelinek <jakub@redhat.com>
+ * dwarf2out.c (fortran_common): Update comment.
+ (gen_variable_die): Swap com_die and var_die variables in Fortran
+ COMMON block handling code.
+
* dwarf2out.c (descr_info_loc): Handle VAR_DECL.
* dwarf2out.c (gen_const_die): New function.
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 22c3624..567fc7a 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -11556,8 +11556,8 @@ secname_for_decl (const_tree decl)
return secname;
}
-/* Check whether decl is a Fortran COMMON symbol. If not, NULL_RTX is returned.
- If so, the rtx for the SYMBOL_REF for the COMMON block is returned, and the
+/* Check whether decl is a Fortran COMMON symbol. If not, NULL_TREE is
+ returned. If so, the decl for the COMMON block is returned, and the
value is the offset into the common block for the symbol. */
static tree
@@ -13780,10 +13780,10 @@ gen_variable_die (tree decl, dw_die_ref context_die)
dw_die_ref com_die;
dw_loc_descr_ref loc;
- com_die = lookup_decl_die (decl);
- if (com_die)
+ var_die = lookup_decl_die (decl);
+ if (var_die)
{
- if (get_AT (com_die, DW_AT_location) == NULL)
+ if (get_AT (var_die, DW_AT_location) == NULL)
{
loc = loc_descriptor_from_tree (com_decl);
if (loc)
@@ -13791,54 +13791,54 @@ gen_variable_die (tree decl, dw_die_ref context_die)
if (off)
add_loc_descr (&loc, new_loc_descr (DW_OP_plus_uconst,
off, 0));
- add_AT_loc (com_die, DW_AT_location, loc);
- remove_AT (com_die, DW_AT_declaration);
+ add_AT_loc (var_die, DW_AT_location, loc);
+ remove_AT (var_die, DW_AT_declaration);
}
}
return;
}
field = TREE_OPERAND (DECL_VALUE_EXPR (decl), 0);
- var_die = lookup_decl_die (com_decl);
+ com_die = lookup_decl_die (com_decl);
loc = loc_descriptor_from_tree (com_decl);
- if (var_die == NULL)
+ if (com_die == NULL)
{
const char *cnam
= IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (com_decl));
- var_die = new_die (DW_TAG_common_block, context_die, decl);
- add_name_and_src_coords_attributes (var_die, com_decl);
+ com_die = new_die (DW_TAG_common_block, context_die, decl);
+ add_name_and_src_coords_attributes (com_die, com_decl);
if (loc)
{
- add_AT_loc (var_die, DW_AT_location, loc);
+ add_AT_loc (com_die, DW_AT_location, loc);
/* Avoid sharing the same loc descriptor between
DW_TAG_common_block and DW_TAG_variable. */
loc = loc_descriptor_from_tree (com_decl);
}
else if (DECL_EXTERNAL (decl))
- add_AT_flag (var_die, DW_AT_declaration, 1);
- add_pubname_string (cnam, var_die); /* ??? needed? */
- equate_decl_number_to_die (com_decl, var_die);
+ add_AT_flag (com_die, DW_AT_declaration, 1);
+ add_pubname_string (cnam, com_die); /* ??? needed? */
+ equate_decl_number_to_die (com_decl, com_die);
}
- else if (get_AT (var_die, DW_AT_location) == NULL && loc)
+ else if (get_AT (com_die, DW_AT_location) == NULL && loc)
{
- add_AT_loc (var_die, DW_AT_location, loc);
+ add_AT_loc (com_die, DW_AT_location, loc);
loc = loc_descriptor_from_tree (com_decl);
- remove_AT (var_die, DW_AT_declaration);
+ remove_AT (com_die, DW_AT_declaration);
}
- com_die = new_die (DW_TAG_variable, var_die, decl);
- add_name_and_src_coords_attributes (com_die, decl);
- add_type_attribute (com_die, TREE_TYPE (decl), TREE_READONLY (decl),
+ var_die = new_die (DW_TAG_variable, com_die, decl);
+ add_name_and_src_coords_attributes (var_die, decl);
+ add_type_attribute (var_die, TREE_TYPE (decl), TREE_READONLY (decl),
TREE_THIS_VOLATILE (decl), context_die);
- add_AT_flag (com_die, DW_AT_external, 1);
+ add_AT_flag (var_die, DW_AT_external, 1);
if (loc)
{
if (off)
add_loc_descr (&loc, new_loc_descr (DW_OP_plus_uconst, off, 0));
- add_AT_loc (com_die, DW_AT_location, loc);
+ add_AT_loc (var_die, DW_AT_location, loc);
}
else if (DECL_EXTERNAL (decl))
- add_AT_flag (com_die, DW_AT_declaration, 1);
- equate_decl_number_to_die (decl, com_die);
+ add_AT_flag (var_die, DW_AT_declaration, 1);
+ equate_decl_number_to_die (decl, var_die);
return;
}