https://gcc.gnu.org/g:93013672e863b3e0fb99b8adafd84c6850797100

commit r17-818-g93013672e863b3e0fb99b8adafd84c6850797100
Author: Sergei Trofimovich <[email protected]>
Date:   Tue May 26 20:53:17 2026 +0100

    bootstrap/125318 - fix gcc/tree-vect-stmts.cc uninit error
    
    Without the change gcc fails to build on master in
    --enable-checking=release mode as:
    
        gcc/tree-vect-stmts.cc:10408:47: error: ‘stride_step’
          may be used uninitialized [-Werror=maybe-uninitialized]
    
    This happens due to a limit hit in uninit anaysis. To avoid intermittent
    build failures dependent on code size let's unconditionally initialize
    the stride_step.
    
            PR bootstrap/125318
            * tree-vect-stmts.cc (vectorizable_load): Explicitly
            initialize stride_step to work around
            -Werror=maybe-uninitialized build failure.

Diff:
---
 gcc/tree-vect-stmts.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index da87b3297155..09ee794300be 100644
--- a/gcc/tree-vect-stmts.cc
+++ b/gcc/tree-vect-stmts.cc
@@ -10153,7 +10153,7 @@ vectorizable_load (vec_info *vinfo,
       tree ivstep;
       tree running_off;
       vec<constructor_elt, va_gc> *v = NULL;
-      tree stride_base, stride_step, alias_off;
+      tree stride_base, stride_step = NULL_TREE, alias_off;
       /* Checked by get_load_store_type.  */
       unsigned int const_nunits = nunits.to_constant ();
       unsigned HOST_WIDE_INT cst_offset = 0;

Reply via email to