Commit 72ac05b0 by Nathan Froyd Committed by Nathan Froyd

tree.c (nreverse): Assert that we don't have a BLOCK.

gcc/
	* tree.c (nreverse): Assert that we don't have a BLOCK.

gcc/ada/
	* gcc-interface/utils.c (gnat_poplevel): Use blocks_nreverse.

From-SVN: r163036
parent bfc48cd8
2010-08-09 Nathan Froyd <froydnj@codesourcery.com> 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
* tree.c (nreverse): Assert that we don't have a BLOCK.
2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
* builtins.c (fold_builtin_next_arg): Use stdarg_p. * builtins.c (fold_builtin_next_arg): Use stdarg_p.
* config/arm/arm.c (arm_get_pcs_model): Likewise. * config/arm/arm.c (arm_get_pcs_model): Likewise.
* config/avr/avr.c (init_cumulative_args): Likewise. * config/avr/avr.c (init_cumulative_args): Likewise.
......
2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
* gcc-interface/utils.c (gnat_poplevel): Use blocks_nreverse.
2010-08-09 Eric Botcazou <ebotcazou@adacore.com> 2010-08-09 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (build_vms_descriptor32): Fix formatting. * gcc-interface/utils.c (build_vms_descriptor32): Fix formatting.
......
...@@ -382,7 +382,7 @@ gnat_poplevel (void) ...@@ -382,7 +382,7 @@ gnat_poplevel (void)
tree block = level->block; tree block = level->block;
BLOCK_VARS (block) = nreverse (BLOCK_VARS (block)); BLOCK_VARS (block) = nreverse (BLOCK_VARS (block));
BLOCK_SUBBLOCKS (block) = nreverse (BLOCK_SUBBLOCKS (block)); BLOCK_SUBBLOCKS (block) = blocks_nreverse (BLOCK_SUBBLOCKS (block));
/* If this is a function-level BLOCK don't do anything. Otherwise, if there /* If this is a function-level BLOCK don't do anything. Otherwise, if there
are no variables free the block and merge its subblocks into those of its are no variables free the block and merge its subblocks into those of its
......
...@@ -2108,6 +2108,9 @@ nreverse (tree t) ...@@ -2108,6 +2108,9 @@ nreverse (tree t)
tree prev = 0, decl, next; tree prev = 0, decl, next;
for (decl = t; decl; decl = next) for (decl = t; decl; decl = next)
{ {
/* We shouldn't be using this function to reverse BLOCK chains; we
have blocks_nreverse for that. */
gcc_checking_assert (TREE_CODE (decl) != BLOCK);
next = TREE_CHAIN (decl); next = TREE_CHAIN (decl);
TREE_CHAIN (decl) = prev; TREE_CHAIN (decl) = prev;
prev = decl; prev = decl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment