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

            Bug ID: 116214
           Summary: -Wmaybe-uninitialized in tree-vect-stmts.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 58812
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58812&action=edit
tree-vect-stmts.ii.xz

```
$ gcc -c tree-vect-stmts.ii -O3 -fno-exceptions -Werror=maybe-uninitialized
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/tree-vect-stmts.cc:
In function ‘bool vect_truncate_gather_scatter_offset(stmt_vec_info,
loop_vec_info, bool, gather_scatter_info*)’:
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/tree-vect-stmts.cc:1712:47:
warning: narrowing conversion of ‘vect_get_scalar_dr_size(dr_info)’ from
‘unsigned int’ to ‘int’ [-Wnarrowing]
 1712 |   int scales[] = { 1, vect_get_scalar_dr_size (dr_info) };
      |                       ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/tree-vect-stmts.cc:
In function ‘bool vectorizable_operation(vec_info*, stmt_vec_info,
gimple_stmt_iterator*, gimple**, slp_tree, stmt_vector_for_cost*)’:
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/tree-vect-stmts.cc:7095:66:
warning: narrowing conversion of ‘ncopies’ from ‘int’ to ‘unsigned int’
[-Wnarrowing]
 7095 |                                                                 
ncopies}))
      |                                                                 
^~~~~~~
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/tree-vect-stmts.cc:7105:66:
warning: narrowing conversion of ‘ncopies’ from ‘int’ to ‘unsigned int’
[-Wnarrowing]
 7105 |                                                                 
ncopies }))
      |                                                                 
^~~~~~~
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/tree-vect-stmts.cc:
In function ‘bool vectorizable_load(vec_info*, stmt_vec_info,
gimple_stmt_iterator*, gimple**, slp_tree, stmt_vector_for_cost*)’:
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/tree-vect-stmts.cc:10388:47:
error: ‘stride_step’ may be used uninitialized [-Werror=maybe-uninitialized]
10388 |                         = gimple_build_assign (newoff,
POINTER_PLUS_EXPR,
      |                          
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
10389 |                                                running_off,
stride_step);
      |                                               
~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/tree-vect-stmts.cc:10207:25:
note: ‘stride_step’ was declared here
10207 |       tree stride_base, stride_step, alias_off;
      |                         ^~~~~~~~~~~
cc1plus: some warnings being treated as errors
```

Reply via email to