summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordrow <drow@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-06 22:02:34 +0000
committerdrow <drow@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-06 22:02:34 +0000
commit53629ffa52b8976d23e36d7ab9bab18df3a11a0a (patch)
treea271ac0a938b36bc6dc6250ebe3df557111e9508
parent379670b13f1197d76182b21b4fd163a273f38602 (diff)
downloadppe42-gcc-53629ffa52b8976d23e36d7ab9bab18df3a11a0a.tar.gz
ppe42-gcc-53629ffa52b8976d23e36d7ab9bab18df3a11a0a.zip
* semantics.c (expand_body): Assert that we are not nested.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87126 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/semantics.c7
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index fd9b97d6677..0625d8b4938 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2004-09-06 Daniel Jacobowitz <dan@debian.org>
+
+ * semantics.c (expand_body): Assert that we are not nested.
+
2004-09-06 Zack Weinberg <zack@codesourcery.com>
* decl.c (build_enumerator): Use add_double and int_fits_type_p
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index cadb5a7e038..dd35580067c 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -2881,7 +2881,12 @@ expand_body (tree fn)
/* Emit any thunks that should be emitted at the same time as FN. */
emit_associated_thunks (fn);
- tree_rest_of_compilation (fn, function_depth > 1);
+ /* This function is only called from cgraph, or recursively from
+ emit_associated_thunks. In neither case should we be currently
+ generating trees for a function. */
+ gcc_assert (function_depth == 0);
+
+ tree_rest_of_compilation (fn, 0);
current_function_decl = saved_function;
OpenPOWER on IntegriCloud