summaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-04-23 14:20:59 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-04-23 14:20:59 +0000
commitc67f69a3f3977669094ed9a815116d2b97ac09d1 (patch)
tree50df64df3664841767cd0b745467545dd81c33a7 /gcc/tree.c
parent086058c2a6338dc9e0f1b8d0962da1ee7363f4c7 (diff)
downloadgcc-c67f69a3f3977669094ed9a815116d2b97ac09d1.tar.gz
re PR lto/42653 (ICE with -g and -flto (requires both flags to crash))
2010-04-23 Richard Guenther <rguenther@suse.de> PR lto/42653 * tree.c (free_lang_data_in_decl): Do not reset DECL_CONTEXT of FUNCTION_DECLs. * g++.dg/lto/20100423-1_0.C: New testcase. From-SVN: r158666
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 0eab137863b..561367bdd43 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4361,7 +4361,8 @@ free_lang_data_in_decl (tree decl)
/* Ignore any intervening types, because we are going to clear their
TYPE_CONTEXT fields. */
- if (TREE_CODE (decl) != FIELD_DECL)
+ if (TREE_CODE (decl) != FIELD_DECL
+ && TREE_CODE (decl) != FUNCTION_DECL)
DECL_CONTEXT (decl) = decl_function_context (decl);
if (DECL_CONTEXT (decl)