https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86844
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Thu Oct 11 17:39:46 2018 New Revision: 265047 URL: https://gcc.gnu.org/viewcvs?rev=265047&root=gcc&view=rev Log: Backported from mainline 2018-09-12 Jakub Jelinek <ja...@redhat.com> Andreas Krebbel <kreb...@linux.ibm.com> PR tree-optimization/86844 * gimple-ssa-store-merging.c (imm_store_chain_info::coalesce_immediate): For overlapping stores, if there are any overlapping stores in between them, make sure they are also coalesced or we give up completely. * gcc.c-torture/execute/pr86844.c: New test. * gcc.dg/store_merging_22.c: New test. * gcc.dg/store_merging_23.c: New test. Added: branches/gcc-8-branch/gcc/testsuite/gcc.c-torture/execute/pr86844.c branches/gcc-8-branch/gcc/testsuite/gcc.dg/store_merging_22.c branches/gcc-8-branch/gcc/testsuite/gcc.dg/store_merging_23.c Modified: branches/gcc-8-branch/gcc/ChangeLog branches/gcc-8-branch/gcc/gimple-ssa-store-merging.c branches/gcc-8-branch/gcc/testsuite/ChangeLog