On Wed, Nov 03, 2021 at 12:04:20AM +0100, Jan Hubicka via Gcc-patches wrote: > > It broke GCC bootstrap: > > > > https://gcc.gnu.org/pipermail/gcc-regression/2021-November/075676.html > > > > In file included from ../../src-master/gcc/coretypes.h:474, > > from ../../src-master/gcc/expmed.c:26: > > In function ‘poly_uint16 mode_to_bytes(machine_mode)’, > > inlined from ‘typename if_nonpoly<typename > > T::measurement_type>::type GET_MODE_SIZE(const T&) [with T = > > scalar_int_mode]’ at ../../src-master/gcc/machmode.h:647:24, > > inlined from ‘rtx_def* emit_store_flag_1(rtx, rtx_code, rtx, rtx, > > machine_mode, int, int, machine_mode)’ at > > ../../src-master/gcc/expmed.c:5723:56: > > ../../src-master/gcc/machmode.h:550:49: warning: ‘*(unsigned > > int*)((char*)&int_mode + offsetof(scalar_int_mode, > > scalar_int_mode::m_mode))’ may be used uninitialized in this function > > [-Wmaybe-uninitialized] > > 550 | ? mode_size_inline (mode) : mode_size[mode]); > > | ^~~~ > > ../../src-master/gcc/expmed.c: In function ‘rtx_def* > > emit_store_flag_1(rtx, rtx_code, rtx, rtx, machine_mode, int, int, > > machine_mode)’: > > ../../src-master/gcc/expmed.c:5652:19: note: ‘*(unsigned > > int*)((char*)&int_mode + offsetof(scalar_int_mode, > > scalar_int_mode::m_mode))’ was declared here > > 5652 | scalar_int_mode int_mode; > > | ^~~~~~~~ > > I seem to be able to bootstrap normally, so perhaps it is related to > --with-arch=native. I will try with that config. > However looking at the code > scalar_int_mode int_mode; > if (is_int_mode (mode, &int_mode) > && GET_MODE_BITSIZE (int_mode) == BITS_PER_WORD * 2 > > the int_mode is indeed set conditionally and it is possible that this > may trigger false positive. I will however try again that we get same > modref summaries before and after patch.
I'm pretty sure the above are just warnings and the error H.J. was most likely see from the gcc-regression mail is the one fixed with https://gcc.gnu.org/r12-4854-g1fefb6cf62b7411223a5459af40e6b98e3624535 I ran into the same issue... Jakub