From: Sergei Trofimovich <[email protected]>

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index da87b329715..66186f839f7 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 /* PR TODO */, alias_off;
       /* Checked by get_load_store_type.  */
       unsigned int const_nunits = nunits.to_constant ();
       unsigned HOST_WIDE_INT cst_offset = 0;
-- 
2.54.0

Reply via email to