From 07bfc9c103a685d5ad59ce846188c449e81055df Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 22 Feb 2016 22:34:49 +0100 Subject: [PATCH] re PR target/69888 (ICE: SIGSEGV in decide_alg (i386.c:26169) due to infinite (?) recursion with -minline-all-stringops -mmemset-strategy=no_stringop:-1:noalign) PR target/69888 * config/i386/i386.c (decide_alg): Ensure we don't recurse with identical arguments. Formatting and spelling fixes. * gcc.target/i386/pr69888.c: New test. From-SVN: r233615 --- gcc/config/i386/i386.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 5c034f24304..29c73f6ff45 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -26153,7 +26153,7 @@ decide_alg (HOST_WIDE_INT count, HOST_WIDE_INT expected_size, || !alg_usable_p (algs->unknown_size, memset, have_as))) { enum stringop_alg alg; - HOST_WIDE_INT new_expected_size = max > 0 ? max / 2 : 2048; + HOST_WIDE_INT new_expected_size = (max > 0 ? max : 4096) / 2; /* If there aren't any usable algorithms or if recursing with the same arguments as before, then recursing on smaller sizes or -- 2.30.2