Commit e2d13a4a by Eric Botcazou Committed by Eric Botcazou

utils.c (begin_subprog_body): Assert that the body is present in the same…

utils.c (begin_subprog_body): Assert that the body is present in the same context as the declaration.

	* gcc-interface/utils.c (begin_subprog_body): Assert that the body is
	present in the same context as the declaration.

From-SVN: r220510
parent 5f5bfe7f
2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (begin_subprog_body): Assert that the body is
present in the same context as the declaration.
2015-02-07 Jakub Jelinek <jakub@redhat.com>
PR middle-end/64340
......
......@@ -3105,6 +3105,11 @@ begin_subprog_body (tree subprog_decl)
/* This function is being defined. */
TREE_STATIC (subprog_decl) = 1;
/* The failure of this assertion will likely come from a wrong context for
the subprogram body, e.g. another procedure for a procedure declared at
library level. */
gcc_assert (current_function_decl == decl_function_context (subprog_decl));
current_function_decl = subprog_decl;
/* Enter a new binding level and show that all the parameters belong to
......
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