From 9d40923511b5f6a8d33b20cae6d9a6fe3e11f16b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 10 Apr 2019 09:28:05 +0200 Subject: re PR middle-end/90025 (botan2 miscompilation on s390x-linux since r268957) PR middle-end/90025 * expr.c (store_expr): Set properly size on the MEM passed to clear_storage. * gcc.c-torture/execute/pr90025.c: New test. From-SVN: r270247 --- gcc/expr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/expr.c') diff --git a/gcc/expr.c b/gcc/expr.c index 9ff5e5f..fa15b7e 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -5658,7 +5658,8 @@ store_expr (tree exp, rtx target, int call_param_p, dest_mem = store_by_pieces (target, str_copy_len, string_cst_read_str, (void *) str, MEM_ALIGN (target), false, RETURN_END); - clear_storage (adjust_address (dest_mem, BLKmode, 0), + clear_storage (adjust_address_1 (dest_mem, BLKmode, 0, 1, 1, 0, + exp_len - str_copy_len), GEN_INT (exp_len - str_copy_len), BLOCK_OP_NORMAL); return NULL_RTX; } -- cgit v1.1