Commit b5be36b1 by Ilya Enkovich Committed by Ilya Enkovich

cfgexpand.c (expand_gimple_stmt_1): Return statement with DECL as return value…

cfgexpand.c (expand_gimple_stmt_1): Return statement with DECL as return value is allowed to have NULL bounds.

gcc/

	* cfgexpand.c (expand_gimple_stmt_1): Return statement with
	DECL as return value is allowed to have NULL bounds.

From-SVN: r231224
parent 71819f45
2015-12-03 Ilya Enkovich <enkovich.gnu@gmail.com>
* cfgexpand.c (expand_gimple_stmt_1): Return statement with
DECL as return value is allowed to have NULL bounds.
2015-12-03 Tom de Vries <tom@codesourcery.com> 2015-12-03 Tom de Vries <tom@codesourcery.com>
* graphite-isl-ast-to-gimple.c (binary_op_to_tree) * graphite-isl-ast-to-gimple.c (binary_op_to_tree)
...@@ -3534,6 +3534,12 @@ expand_gimple_stmt_1 (gimple *stmt) ...@@ -3534,6 +3534,12 @@ expand_gimple_stmt_1 (gimple *stmt)
{ {
tree result = DECL_RESULT (current_function_decl); tree result = DECL_RESULT (current_function_decl);
/* Mark we have return statement with missing bounds. */
if (!bnd
&& chkp_function_instrumented_p (cfun->decl)
&& !DECL_P (op0))
bnd = error_mark_node;
/* If we are not returning the current function's RESULT_DECL, /* If we are not returning the current function's RESULT_DECL,
build an assignment to it. */ build an assignment to it. */
if (op0 != result) if (op0 != result)
...@@ -3550,9 +3556,6 @@ expand_gimple_stmt_1 (gimple *stmt) ...@@ -3550,9 +3556,6 @@ expand_gimple_stmt_1 (gimple *stmt)
op0 = build2 (MODIFY_EXPR, TREE_TYPE (result), op0 = build2 (MODIFY_EXPR, TREE_TYPE (result),
result, op0); result, op0);
} }
/* Mark we have return statement with missing bounds. */
if (!bnd && chkp_function_instrumented_p (cfun->decl))
bnd = error_mark_node;
} }
if (!op0) if (!op0)
......
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