From 6a8b140878bc20952391e854529721ea1e6dd546 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 14 Feb 2017 09:45:31 +0100 Subject: [PATCH] re PR target/79462 (sh: Stack smashing detected when building __ashrdi3 in libgcc) PR target/79462 * config/sh/sh.c (expand_cbranchdi4): Don't clear operands[4]. From-SVN: r245421 --- gcc/ChangeLog | 3 +++ gcc/config/sh/sh.c | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c6adafff2a6..8abe8c592ce 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2017-02-14 Jakub Jelinek + PR target/79462 + * config/sh/sh.c (expand_cbranchdi4): Don't clear operands[4]. + PR tree-optimization/79408 * tree-vrp.c (simplify_div_or_mod_using_ranges): Handle also the case when on TRUNC_MOD_EXPR op0 is INTEGER_CST. diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index f85315db3ae..5b84b15e7ba 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -2152,7 +2152,6 @@ expand_cbranchdi4 (rtx *operands, enum rtx_code comparison) } operands[1] = op1h; operands[2] = op2h; - operands[4] = NULL_RTX; if (msw_taken != LAST_AND_UNUSED_RTX_CODE) expand_cbranchsi4 (operands, msw_taken, msw_taken_prob); -- 2.30.2