https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110672
Bug ID: 110672 Summary: vec.h:1023:9: error: 'new_temp' may be used uninitialized [-Werror=maybe-uninitialized] Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: danglin at gcc dot gnu.org Target Milestone: --- Host: hppa64-hp-hpux11.11 Target: hppa64-hp-hpux11.11 Build: hppa64-hp-hpux11.11 In stage2, /home/dave/gnu/gcc/objdir64/./prev-gcc/xg++ -B/home/dave/gnu/gcc/objdir64/./prev-gcc/ -B/opt/gnu64/gcc/gcc-14/hppa64-hp-hpux11.11/bin/ -nostdinc++ -B/home/dave/gnu/gcc/objdir64/prev-hppa64-hp-hpux11.11/libstdc++-v3/src/.libs -B/home/dave/gnu/gcc/objdir64/prev-hppa64-hp-hpux11.11/libstdc++-v3/libsupc++/.libs -I/home/dave/gnu/gcc/objdir64/prev-hppa64-hp-hpux11.11/libstdc++-v3/include/hppa64-hp-hpux11.11 -I/home/dave/gnu/gcc/objdir64/prev-hppa64-hp-hpux11.11/libstdc++-v3/include -I/home/dave/gnu/gcc/gcc/libstdc++-v3/libsupc++ -L/home/dave/gnu/gcc/objdir64/prev-hppa64-hp-hpux11.11/libstdc++-v3/src/.libs -L/home/dave/gnu/gcc/objdir64/prev-hppa64-hp-hpux11.11/libstdc++-v3/libsupc++/.libs -fno-PIE -c -g -O2 -fno-checking -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -DHAVE_CONFIG_H -fno-PIE -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libcody -I/opt/gnu64/gcc/gmp/include -I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/gcc/../libbacktrace -I/opt/gnu64/gcc/gmp/include -o tree-vect-slp.o -MT tree-vect-slp.o -MMD -MP -MF ./.deps/tree-vect-slp.TPo ../../gcc/gcc/tree-vect-slp.cc In file included from ../../gcc/gcc/hash-table.h:248, from ../../gcc/gcc/coretypes.h:486, from ../../gcc/gcc/tree-vect-stmts.cc:24: In member function 'T* vec<T, A, vl_embed>::quick_push(const T&) [with T = tree_node*; A = va_heap]', inlined from 'T* vec<T>::quick_push(const T&) [with T = tree_node*]' at ../../gcc/gcc/vec.h:1987:28, inlined from 'bool vectorizable_load(vec_info*, stmt_vec_info, gimple_stmt_iterator*, gimple**, slp_tree, stmt_vector_for_cost*)' at ../../gcc/gcc/tree-vect-stmts.cc:10962:23: ../../gcc/gcc/vec.h:1023:9: error: 'new_temp' may be used uninitialized [-Werror=maybe-uninitialized] 1023 | *slot = obj; | ~~~~~~^~~~~ ../../gcc/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*)': ../../gcc/gcc/tree-vect-stmts.cc:9300:8: note: 'new_temp' was declared here 9300 | tree new_temp; | ^~~~~~~~ cc1plus: all warnings being treated as errors Initializing new_temp to NULL_TREE fixes warning.