diff options
author | Martin Liska <mliska@suse.cz> | 2018-12-27 09:51:14 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-12-27 08:51:14 +0000 |
commit | 42bdb8f24940aa932e73feda2750e0e80c018441 (patch) | |
tree | 38af505644fd86939b4e0d4e5b8703c68753932a /gcc/expr.c | |
parent | 44787584dea62b5368235f3d9d38431fd902fb40 (diff) |
Comparison with an enum should mention enum value.
2018-12-27 Martin Liska <mliska@suse.cz>
* builtins.c (expand_movstr): Compare with RETURN_BEGIN.
* expr.c (move_by_pieces): Likewise.
(store_by_pieces): Likewise.
(store_expr): Fix GNU coding style.
From-SVN: r267430
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index 81831342677..abbaef2d9ce 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -1220,7 +1220,7 @@ move_by_pieces (rtx to, rtx from, unsigned HOST_WIDE_INT len, data.run (); - if (retmode) + if (retmode != RETURN_BEGIN) return data.finish_retmode (retmode); else return to; @@ -1388,7 +1388,7 @@ store_by_pieces (rtx to, unsigned HOST_WIDE_INT len, store_by_pieces_d data (to, constfun, constfundata, len, align); data.run (); - if (retmode) + if (retmode != RETURN_BEGIN) return data.finish_retmode (retmode); else return to; @@ -5609,13 +5609,13 @@ store_expr (tree exp, rtx target, int call_param_p, dest_mem = target; + memop_ret retmode = exp_len > str_copy_len ? RETURN_END : RETURN_BEGIN; dest_mem = store_by_pieces (dest_mem, str_copy_len, builtin_strncpy_read_str, CONST_CAST (char *, TREE_STRING_POINTER (str)), MEM_ALIGN (target), false, - (exp_len > str_copy_len ? RETURN_END : - RETURN_BEGIN)); + retmode); if (exp_len > str_copy_len) clear_storage (adjust_address (dest_mem, BLKmode, 0), GEN_INT (exp_len - str_copy_len), |