On Sat, 6 Jun 2020 at 22:30, Martin Sebor via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > A recent enhancement to the uninitialized access coverage to include > dynamically allocated objects, including alloca and VLAs, triggers > an expected instance of -Wmaybe-uninitialized on powerpc64-linux > in reload_cse_simplify_operands where an element of an XALLOCAVEC- > allocated array is read before it's provably assigned to. With > -Werror this causes the bootstrap there to fail. > > The attached patch avoids the warning by clearing the element first. > > Although not necessary to avoid the warning, the patch also adds > an assert to verify that the array isn't accessed outside its bounds. > recog.c sets which_alternative to -1 in a couple of places and > a number of tests for it being equal to it so I added the assert > "just to be sure." > > Tested on x86_64-linux (the warning was also confirmed gone on > powerpc64 by the reporter). >
Thanks for the fix, I've seen the same problem on arm and aarch64 (don't know why bootstrap still works on x86_64) Christophe > Martin