[Bug middle-end/97840] [11 regression] Bogus -Wmaybe-uninitialized

hubicka at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 16 18:18:00 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97840

--- Comment #9 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Created attachment 49571
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49571&action=edit
Warnings building cc1plus with LTO

This is current set of wranings building cc1plus with LTO. there are 66
maybe-uninitialized.

I always wondered if we want to print warnings exposing GCC internals like:
../gmp/mpz/../../../gmp/mpz/swap.c:38:3: warning: ‘MEM[(struct __mpz_struct
*)&cst]._mp_size’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
../gmp/mpz/../../../gmp/mpz/swap.c:37:3: warning: ‘MEM[(struct __mpz_struct
*)&cst]._mp_alloc’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
../isl/../../isl/isl_tab.c:2940:29: warning: ‘var’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
../gmp/mpz/../../../gmp/mpz/swap.c:39:3: warning: ‘MEM[(struct __mpz_struct
*)&cst]._mp_d’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
../gmp/mpz/../../../gmp/mpz/swap.c:38:3: warning: ‘MEM[(struct __mpz_struct
*)&cst]._mp_size’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
../gmp/mpz/../../../gmp/mpz/swap.c:37:3: warning: ‘MEM[(struct __mpz_struct
*)&cst]._mp_alloc’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
../../gcc/machmode.h:546:49: warning: ‘MEM[(struct scalar_int_mode
*)&int_mode]’ may be used uninitialized in this function
[-Wmaybe-uninitialized]

A lot of warnings are about remainder_len in wide-int.  Tehere is loop
iniitalizeing it and seems we do not work out it has non-0 number of
iteraitons.
../../gcc/analyzer/store.cc:647:13: warning: ‘MEM[(long int *)&sval_bit_size +
8B]’ may be used uninitialized [-Wmaybe-uninitialized]
../../gcc/analyzer/store.cc:647:13: warning: ‘MEM[(long int *)&sval_bit_size +
16B]’ may be used uninitialized [-Wmaybe-uninitialized]

the MEM_REF syntax is not very pretty.


More information about the Gcc-bugs mailing list