+2016-02-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/69705
+ * dwarf2out.c (gen_variable_die): Work around buggy LTO
+ - allow NULL decl for Fortran DW_TAG_common_block variables.
+
2016-02-24 Jason Merrill <jason@redhat.com>
* common.opt (flifetime-dse): Add -flifetime-dse=1.
2016-02-24 Richard Biener <rguenther@suse.de>
- Jakub Jelinek <jakub@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
PR middle-end/69760
* tree-scalar-evolution.c (interpret_rhs_expr): Re-write
DW_TAG_common_block and DW_TAG_variable. */
loc = loc_list_from_tree (com_decl, 2, NULL);
}
- else if (DECL_EXTERNAL (decl))
+ else if (DECL_EXTERNAL (decl_or_origin))
add_AT_flag (com_die, DW_AT_declaration, 1);
if (want_pubnames ())
add_pubname_string (cnam, com_die); /* ??? needed? */
remove_AT (com_die, DW_AT_declaration);
}
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), decl_quals (decl), false,
+ add_name_and_src_coords_attributes (var_die, decl_or_origin);
+ add_type_attribute (var_die, TREE_TYPE (decl_or_origin),
+ decl_quals (decl_or_origin), false,
context_die);
add_AT_flag (var_die, DW_AT_external, 1);
if (loc)
}
add_AT_location_description (var_die, DW_AT_location, loc);
}
- else if (DECL_EXTERNAL (decl))
+ else if (DECL_EXTERNAL (decl_or_origin))
add_AT_flag (var_die, DW_AT_declaration, 1);
- equate_decl_number_to_die (decl, var_die);
+ if (decl)
+ equate_decl_number_to_die (decl, var_die);
return;
}