]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
bootstrap/125318 - fix gcc/tree-vect-stmts.cc uninit error
authorSergei Trofimovich <siarheit@google.com>
Tue, 26 May 2026 19:53:17 +0000 (20:53 +0100)
committerSergei Trofimovich <siarheit@google.com>
Tue, 26 May 2026 21:46:46 +0000 (22:46 +0100)
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.

gcc/tree-vect-stmts.cc

index da87b3297155a62dac2c648aefb926128ad4e740..09ee794300bee2d4ea687f71908800f87060cd50 100644 (file)
@@ -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;