From 5c2e00ee5ad147e86df88447e1cf32038e6e81ee Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Thu, 6 Mar 2003 14:30:22 +0100 Subject: [PATCH] * cgraph.c (cgraph_node): Do not confuse nested functions and methods. From-SVN: r63889 --- gcc/ChangeLog | 4 ++++ gcc/cgraph.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6cb5a3841b6..6a565690cd6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Thu Mar 6 14:20:15 CET 2003 Jan Hubicka + + * cgraph.c (cgraph_node): Do not confuse nested functions and methods. + 2003-03-06 Zdenek Dvorak * dwarf2out.c (size_of_die): Compute size of external reference to diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 185a97b5651..1a078f6750e 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -98,7 +98,7 @@ cgraph_node (decl) cgraph_nodes = node; cgraph_n_nodes++; *slot = node; - if (DECL_CONTEXT (decl)) + if (DECL_CONTEXT (decl) && TREE_CODE (DECL_CONTEXT (decl)) == FUNCTION_DECL) { node->origin = cgraph_node (DECL_CONTEXT (decl)); node->next_nested = node->origin->nested; -- 2.30.2