On Tue, 2017-08-15 at 21:15 +0000, Joseph Myers wrote: > GCC mainline built for sh4-linux-gnu runs out of memory building a > glibc test, which calls strncmp with very large constant size > argument, resulting in the SH inline strncmp expansion trying to > inline a fully unrolled expansion of strncmp for that size. > > This patch limits that fully unrolled expansion to the case of less > than 32 bytes. This is explicitly *not* trying to be optimal in any > way (very likely a lower threshold makes sense), just to limit enough > to avoid the out-of-memory issue in the glibc testsuite. > > I have *not* run the GCC testsuite for SH. I have verified that this > allows the glibc testsuite to build OK, with both GCC mainline and > GCC 7 branch (and that the included test builds quickly with patched > GCC, runs out of memory with unpatched GCC). > > OK to commit (mainline and GCC 7 branch)?
Yes, that's OK. This is an older issue. Please also add a reference to PR 67712 in your commit. Can you also apply it to GCC 6 branch please? Thanks! Cheers, Oleg