* semantics.c (expand_body): Assert that we are not nested.
authorDaniel Jacobowitz <dan@debian.org>
Mon, 6 Sep 2004 22:02:34 +0000 (22:02 +0000)
committerDaniel Jacobowitz <drow@gcc.gnu.org>
Mon, 6 Sep 2004 22:02:34 +0000 (22:02 +0000)
From-SVN: r87126

gcc/cp/ChangeLog
gcc/cp/semantics.c

index fd9b97d66775a2f616335a5acdb750ea71d97f8c..0625d8b493881b0f55364e2c4766b07de91163df 100644 (file)
@@ -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
index cadb5a7e0381cfcc0535bde2f16b7f0cbc71cd2d..dd35580067c673697708eb5926f69829fa309668 100644 (file)
@@ -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;