diff options
author | Ilya Enkovich <enkovich.gnu@gmail.com> | 2015-12-03 10:35:41 +0000 |
---|---|---|
committer | Ilya Enkovich <ienkovich@gcc.gnu.org> | 2015-12-03 10:35:41 +0000 |
commit | b5be36b1dba767987999e7fac5af85022e97c113 (patch) | |
tree | c7114aa4d50f9a8b3704b6a52cdb2e8bf4005ac7 /gcc/cfgexpand.c | |
parent | 71819f4573a345d493f874c3573427d2b9596706 (diff) | |
download | gcc-b5be36b1dba767987999e7fac5af85022e97c113.zip gcc-b5be36b1dba767987999e7fac5af85022e97c113.tar.gz gcc-b5be36b1dba767987999e7fac5af85022e97c113.tar.bz2 |
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
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 1990e10..2c3b23d 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -3534,6 +3534,12 @@ expand_gimple_stmt_1 (gimple *stmt) { 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, build an assignment to it. */ if (op0 != result) @@ -3550,9 +3556,6 @@ expand_gimple_stmt_1 (gimple *stmt) op0 = build2 (MODIFY_EXPR, TREE_TYPE (result), result, op0); } - /* Mark we have return statement with missing bounds. */ - if (!bnd && chkp_function_instrumented_p (cfun->decl)) - bnd = error_mark_node; } if (!op0) |