diff options
author | Richard Biener <rguenther@suse.de> | 2018-06-28 10:18:27 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2018-06-28 10:18:27 +0000 |
commit | 4ece5af359f35eaf4fd7434ca3b9570b9b63bea4 (patch) | |
tree | 6573462017a2f3f42ed189f7c3894d8e82338e36 | |
parent | 8e236ddde7aaadb69bc4b2cc33b61b8964ebbcee (diff) | |
download | gcc-4ece5af359f35eaf4fd7434ca3b9570b9b63bea4.zip gcc-4ece5af359f35eaf4fd7434ca3b9570b9b63bea4.tar.gz gcc-4ece5af359f35eaf4fd7434ca3b9570b9b63bea4.tar.bz2 |
dwarf2out.c (gen_subprogram_die): Use is_unit_die when deciding whether to not re-use a DIE.
2018-06-28 Richard Biener <rguenther@suse.de>
* dwarf2out.c (gen_subprogram_die): Use is_unit_die when
deciding whether to not re-use a DIE.
From-SVN: r262217
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e556791..c9f7236 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2018-06-28 Richard Biener <rguenther@suse.de> + * dwarf2out.c (gen_subprogram_die): Use is_unit_die when + deciding whether to not re-use a DIE. + +2018-06-28 Richard Biener <rguenther@suse.de> + * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an DW_AT_abstract_origin attribute. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index bcd47c8..db9f639 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -22780,7 +22780,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die) apply; we just use the old DIE. */ expanded_location s = expand_location (DECL_SOURCE_LOCATION (decl)); struct dwarf_file_data * file_index = lookup_filename (s.file); - if (((is_cu_die (old_die->die_parent) + if (((is_unit_die (old_die->die_parent) /* This condition fixes the inconsistency/ICE with the following Fortran test (or some derivative thereof) while building libgfortran: @@ -22796,9 +22796,6 @@ gen_subprogram_die (tree decl, dw_die_ref context_die) && old_die->die_parent->die_tag == DW_TAG_module) || context_die == NULL) && (DECL_ARTIFICIAL (decl) - /* The location attributes may be in the abstract origin - which in the case of LTO might be not available to - look at. */ || (get_AT_file (old_die, DW_AT_decl_file) == file_index && (get_AT_unsigned (old_die, DW_AT_decl_line) == (unsigned) s.line) |