I tried a valgrind build of recent gcc trunk with -O3 and got this: ==26140== Conditional jump or move depends on uninitialised value(s) ==26140== at 0x145D303: (anonymous namespace)::imm_store_chain_info::try_coalesce_bswap((anonymous namespace)::merged_store_group*, unsigned int, unsigned int) (gimple-ssa-store-merging.c:2393) ==26140== by 0x146390F: coalesce_immediate_stores (gimple-ssa-store-merging.c:2575) ==26140== by 0x146390F: terminate_and_process_chain (gimple-ssa-store-merging.c:3726) Source code is 254948 jakub if (n.base_addr && vuse_store) Configure is ../trunk/configure --prefix=/home/dcb/gcc/results.254990.valgrind \ --disable-bootstrap \ --disable-multilib \ --disable-werror \ --enable-checking=valgrind \ --enable-languages=c,c++,fortran sed 's/-O2/-O3 -funroll-loops -Wtautological-compare/' < Makefile > Makefile.tmp mv Makefile.tmp Makefile
On which source file it is? Can you attach it preprocessed + full command line?
Actually no need, I see what's going on.
Untested fix: 2017-11-21 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/83086 * gimple-ssa-store-merging.c (imm_store_chain_info::try_coalesce_bswap): Test this_n.base_addr rather than n.base_addr. --- gcc/gimple-ssa-store-merging.c.jj 2017-11-21 09:41:00.000000000 +0100 +++ gcc/gimple-ssa-store-merging.c 2017-11-21 12:13:23.346947756 +0100 @@ -2390,7 +2390,7 @@ imm_store_chain_info::try_coalesce_bswap ? try_size - info->bitsize - bitpos : bitpos)) return false; - if (n.base_addr && vuse_store) + if (this_n.base_addr && vuse_store) { unsigned int j; for (j = first; j <= last; ++j)
Author: jakub Date: Tue Nov 21 13:54:08 2017 New Revision: 255002 URL: https://gcc.gnu.org/viewcvs?rev=255002&root=gcc&view=rev Log: PR tree-optimization/83086 * gimple-ssa-store-merging.c (imm_store_chain_info::try_coalesce_bswap): Test this_n.base_addr rather than n.base_addr. Modified: trunk/gcc/ChangeLog trunk/gcc/gimple-ssa-store-merging.c
Fixed.