aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2018-01-10 14:23:29 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2018-01-10 14:23:29 +0000
commit31a3f58f9bc947ecf3d59eb210199a3e5ca0b49f (patch)
tree68fd52e3dcb67e1450deafc59606df3faa1582d8 /gcc
parent6737facbb3c53a1f0158b05e4116c161ed9bc319 (diff)
downloadgcc-31a3f58f9bc947ecf3d59eb210199a3e5ca0b49f.zip
gcc-31a3f58f9bc947ecf3d59eb210199a3e5ca0b49f.tar.gz
gcc-31a3f58f9bc947ecf3d59eb210199a3e5ca0b49f.tar.bz2
re PR debug/83765 (LTO bootstrap with Ada fails)
2018-01-10 Richard Biener <rguenther@suse.de> PR debug/83765 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration early out so it also covers the case where we have a non-NULL origin. From-SVN: r256428
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/dwarf2out.c10
2 files changed, 12 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f0e9e59..01a89c72 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2018-01-10 Richard Biener <rguenther@suse.de>
+
+ PR debug/83765
+ * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
+ early out so it also covers the case where we have a non-NULL
+ origin.
+
2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/83753
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index a34b294..b70856f 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -22044,6 +22044,11 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
int declaration = (current_function_decl != decl
|| class_or_namespace_scope_p (context_die));
+ /* A declaration that has been previously dumped needs no
+ additional information. */
+ if (old_die && declaration)
+ return;
+
/* Now that the C++ front end lazily declares artificial member fns, we
might need to retrofit the declaration into its class. */
if (!declaration && !origin && !old_die
@@ -22084,11 +22089,6 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
much as possible. */
else if (old_die)
{
- /* A declaration that has been previously dumped needs no
- additional information. */
- if (declaration)
- return;
-
if (!get_AT_flag (old_die, DW_AT_declaration)
/* We can have a normal definition following an inline one in the
case of redefinition of GNU C extern inlines.