[Bug middle-end/126952] [17 Regression] build fails with --enable-checking=release: gimple-ssa-warn-access.cc:26 ... may be used uninitialized [-Werror=maybe-uninitialized] since r17-3330
"slyfox at gcc dot gnu.org via Gcc-bugs" <[email protected]>
| Newsgroups | gmane.comp.gcc.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126952
--- Comment #4 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
Created attachment 65376
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65376&action=edit
gimple-ssa-warn-access.cc.cc.xz
gimple-ssa-warn-access.cc.cc.xz is a preprocessed compressed file. Generates
warnings as:
$ xz -d gimple-ssa-warn-access.cc.cc.xz
$ prev-gcc/xg++ -Bprev-gcc/ -O2 -fno-exceptions -c gimple-ssa-warn-access.cc.cc
-Werror=maybe-uninitialized
In member function ‘long int* wide_int_storage::write_val(unsigned int)’,
inlined from ‘void wi::copy(T1&, const T2&) [with T1 = wide_int_storage; T2
= generic_wide_int<wide_int_ref_storage<true, false> >]’ at
gimple-ssa-warn-access.cc.cc:41890:28,
inlined from ‘wide_int_storage& wide_int_storage::operator=(const T&) [with
T = wi::hwi_with_prec]’ at gimple-ssa-warn-access.cc.cc:41149:12,
inlined from ‘generic_wide_int<storage>&
generic_wide_int<T>::operator=(const T&) [with T = wi::hwi_with_prec; storage =
wide_int_storage]’ at gimple-ssa-warn-access.cc.cc:40949:23,
inlined from ‘void irange_bitmask::set_unknown(unsigned int)’ at
gimple-ssa-warn-access.cc.cc:82257:27,
inlined from ‘virtual void irange::set_varying(tree)’ at
gimple-ssa-warn-access.cc.cc:83055:25,
inlined from ‘int_range<N, RESIZABLE>::int_range(tree) [with unsigned int N
= 3; bool RESIZABLE = true]’ at gimple-ssa-warn-access.cc.cc:83022:15,
inlined from ‘bool {anonymous}::memmodel_to_uhwi(tree, gimple*, long
unsigned int*)’ at gimple-ssa-warn-access.cc.cc:108980:45:
gimple-ssa-warn-access.cc.cc:41170:91: error: ‘rng.int_range<3,
true>::<unnamed>.irange::m_bitmask.irange_bitmask::m_value.generic_wide_int<wide_int_storage>::<unnamed>.wide_int_storage::u.wide_int_storage::<unnamed
union>::valp’ may be used uninitialized [-Werror=maybe-uninitialized]
41170 | return (__builtin_expect ((precision > ((((64*(8)) + 64) / 64) *
64)), 0)) ? u.valp : u.val;
|
^~~
gimple-ssa-warn-access.cc.cc: In function ‘bool
{anonymous}::memmodel_to_uhwi(tree, gimple*, long unsigned int*)’:
gimple-ssa-warn-access.cc.cc:108980:21: note: ‘rng’ declared here
108980 | int_range_max rng (((ord)->typed.type));
| ^~~