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

            Bug ID: 116213
           Summary: -Wmaybe-uninitialized in tree-ssa-loop-niter.cc
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 58811
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58811&action=edit
tree-ssa-loop-niter.ii.xz

```
$ gcc -c ./tree-ssa-loop-niter.ii -O3 -fno-exceptions
-Werror=maybe-uninitialized
In file included from
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/coretypes.h:475,
                 from
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/tree-ssa-loop-niter.cc:22:
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
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/wide-int.h:2187:28,
    inlined from ‘wide_int_storage& wide_int_storage::operator=(const T&) [with
T = wi::hwi_with_prec]’ at
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/wide-int.h:1247: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
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/wide-int.h:1002:23,
    inlined from ‘void irange_bitmask::set_unknown(unsigned int)’ at
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/value-range.h:165:27,
    inlined from ‘virtual void irange::set_varying(tree)’ at
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/value-range.h:1138:25,
    inlined from ‘int_range<N, RESIZABLE>::int_range(tree) [with unsigned int N
= 3; bool RESIZABLE = true]’ at
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/value-range.h:1100:15:
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/wide-int.h:1272:91:
error: ‘*(wide_int_storage*)((char*)this +
24).wide_int_storage::u.wide_int_storage::<unnamed union>::valp’ may be used
uninitialized [-Werror=maybe-uninitialized]
 1272 |   return UNLIKELY (precision > WIDE_INT_MAX_INL_PRECISION) ? u.valp :
u.val;
      |                                                                        
                  ^
cc1plus: some warnings being treated as errors
```

Reply via email to