aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-12-22 15:28:24 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-12-22 15:28:24 +0000
commitd002ee3980834eab0898e678339679c82eeb409b (patch)
treef89b8ef39c0324fcc32c313ebc0387e24fd13bac /gcc/lto
parentae2b9cb66258516dff711b22acf4d0dfdc4afcf9 (diff)
downloadgcc-d002ee3980834eab0898e678339679c82eeb409b.zip
gcc-d002ee3980834eab0898e678339679c82eeb409b.tar.gz
gcc-d002ee3980834eab0898e678339679c82eeb409b.tar.bz2
re PR debug/51650 (LTO ICE in dwarf2out_finish, at dwarf2out.c:22501 while building libxul)
2011-12-22 Richard Guenther <rguenther@suse.de> PR lto/51650 * lto.c (uniquify_nodes): Register TYPE_DECLs with the debuginfo machinery. * g++.dg/lto/pr51650-1_0.C: New testcase. * g++.dg/lto/pr51650-2_0.C: Likewise. From-SVN: r182625
Diffstat (limited to 'gcc/lto')
-rw-r--r--gcc/lto/lto.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index 9efd9c3..2ec6c44 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -881,6 +881,9 @@ uniquify_nodes (struct data_in *data_in, unsigned from)
lto_register_var_decl_in_symtab (data_in, t);
else if (TREE_CODE (t) == FUNCTION_DECL && !DECL_BUILT_IN (t))
lto_register_function_decl_in_symtab (data_in, t);
+ else if (!flag_wpa
+ && TREE_CODE (t) == TYPE_DECL)
+ debug_hooks->type_decl (t, !DECL_FILE_SCOPE_P (t));
else if (TYPE_P (t) && !TYPE_CANONICAL (t))
TYPE_CANONICAL (t) = gimple_register_canonical_type (t);
}