[Bug middle-end/126952] New: [17 Regression] build fails with --enable-checking=release: gimple-ssa-warn-access.cc:26 ... may be used uninitialized [-Werror=maybe-uninitialized]
"slyfox at gcc dot gnu.org via Gcc-bugs" <[email protected]>
| Newsgroups | gmane.comp.gcc.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126952
Bug ID: 126952
Summary: [17 Regression] build fails with
--enable-checking=release:
gimple-ssa-warn-access.cc:26 ... may be used
uninitialized [-Werror=maybe-uninitialized]
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: slyfox at gcc dot gnu.org
Target Milestone: ---
Did not bisect. master fails the build on --enable-checking=release at
r17-3443-gaac02c9666184d as:
/tmp/gb/./prev-gcc/xg++ -B/tmp/gb/./prev-gcc/
-B/usr/local/x86_64-pc-linux-gnu/bin/ -nostdinc++
-B/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-B/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs
-I/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu
-I/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/include
-I/home/slyfox/dev/git/gcc/libstdc++-v3/libsupc++
-L/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-L/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -fno-PIE -c
-g -O2 -fno-checking -gtoggle -DIN_GCC -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-error=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/home/slyfox/dev/git/gcc/gcc -I/home/slyfox/dev/git/gcc/gcc/.
-I/home/slyfox/dev/git/gcc/gcc/../include
-I/home/slyfox/dev/git/gcc/gcc/../libcpp/include
-I/home/slyfox/dev/git/gcc/gcc/../libcody
-I/home/slyfox/dev/git/gcc/gcc/../libdecnumber
-I/home/slyfox/dev/git/gcc/gcc/../libdecnumber/bid -I../libdecnumber
-I/home/slyfox/dev/git/gcc/gcc/../libbacktrace -o gimple-ssa-warn-access.o
-MT gimple-ssa-warn-access.o -MMD -MP -MF ./.deps/gimple-ssa-warn-access.TPo
/home/slyfox/dev/git/gcc/gcc/gimple-ssa-warn-access.cc
In file included from /home/slyfox/dev/git/gcc/gcc/coretypes.h:479,
from
/home/slyfox/dev/git/gcc/gcc/gimple-ssa-warn-access.cc:26:
In member function 'long int* wide_int_storage::write_val(unsigned int)',
inlined from 'void wi::copy(T1&, const T2&) [with T1 = wide_int_storage; T2
= generic_wide_int<wide_int_ref_storage<true, false> >]' at
/home/slyfox/dev/git/gcc/gcc/wide-int.h:2187:37,
inlined from 'wide_int_storage& wide_int_storage::operator=(const T&) [with
T = wi::hwi_with_prec]' at /home/slyfox/dev/git/gcc/gcc/wide-int.h:1247:12,
inlined from 'generic_wide_int<storage>&
generic_wide_int<T>::operator=(const T&) [with T = wi::hwi_with_prec; storage =
wide_int_storage]' at /home/slyfox/dev/git/gcc/gcc/wide-int.h:1002:23,
inlined from 'void irange_bitmask::set_unknown(unsigned int)' at
/home/slyfox/dev/git/gcc/gcc/value-range.h:185:27,
inlined from 'virtual void irange::set_varying(tree)' at
/home/slyfox/dev/git/gcc/gcc/value-range.h:1245:25,
inlined from 'int_range<N, RESIZABLE>::int_range(tree) [with unsigned int N
= 3; bool RESIZABLE = true]' at
/home/slyfox/dev/git/gcc/gcc/value-range.h:1207:15,
inlined from 'bool {anonymous}::memmodel_to_uhwi(tree, gimple*, long
unsigned int*)' at
/home/slyfox/dev/git/gcc/gcc/gimple-ssa-warn-access.cc:2870:41:
/home/slyfox/dev/git/gcc/gcc/wide-int.h:1272:73: error: 'rng.int_range<3,
true>::<unnamed>.irange::m_bitmask.irange_bitmask::m_value.generic_wide_int<wide_int_storage>::<unnamed>.wide_int_storage::u.wide_int_storage::<unnamed
union>::valp' may be used uninitialized [-Werror=maybe-uninitialized]
1272 | return UNLIKELY (precision > WIDE_INT_MAX_INL_PRECISION) ? u.valp :
u.val;
|
^~~
/home/slyfox/dev/git/gcc/gcc/gimple-ssa-warn-access.cc: In function 'bool
{anonymous}::memmodel_to_uhwi(tree, gimple*, long unsigned int*)':
/home/slyfox/dev/git/gcc/gcc/gimple-ssa-warn-access.cc:2870:21: note: 'rng'
declared here
2870 | int_range_max rng (TREE_TYPE (ord));
| ^~~
In member function 'long int* wide_int_storage::write_val(unsigned int)',
inlined from 'void wi::copy(T1&, const T2&) [with T1 = wide_int_storage; T2
= generic_wide_int<wide_int_ref_storage<true, false> >]' at
/home/slyfox/dev/git/gcc/gcc/wide-int.h:2187:37,
inlined from 'wide_int_storage& wide_int_storage::operator=(const T&) [with
T = wi::hwi_with_prec]' at /home/slyfox/dev/git/gcc/gcc/wide-int.h:1247:12,
inlined from 'generic_wide_int<storage>&
generic_wide_int<T>::operator=(const T&) [with T = wi::hwi_with_prec; storage =
wide_int_storage]' at /home/slyfox/dev/git/gcc/gcc/wide-int.h:1002:23,
inlined from 'void irange_bitmask::set_unknown(unsigned int)' at
/home/slyfox/dev/git/gcc/gcc/value-range.h:185:27,
inlined from 'virtual void irange::set_varying(tree)' at
/home/slyfox/dev/git/gcc/gcc/value-range.h:1245:25,
inlined from 'int_range<N, RESIZABLE>::int_range(tree) [with unsigned int N
= 3; bool RESIZABLE = true]' at
/home/slyfox/dev/git/gcc/gcc/value-range.h:1207:15,
inlined from 'bool check_nul_terminated_array(GimpleOrTree, tree, tree)
[with GimpleOrTree = gimple*]' at
/home/slyfox/dev/git/gcc/gcc/gimple-ssa-warn-access.cc:338:21:
/home/slyfox/dev/git/gcc/gcc/wide-int.h:1272:73: error: 'r.int_range<3,
true>::<unnamed>.irange::m_bitmask.irange_bitmask::m_value.generic_wide_int<wide_int_storage>::<unnamed>.wide_int_storage::u.wide_int_storage::<unnamed
union>::valp' may be used uninitialized [-Werror=maybe-uninitialized]
1272 | return UNLIKELY (precision > WIDE_INT_MAX_INL_PRECISION) ? u.valp :
u.val;
|
^~~
/home/slyfox/dev/git/gcc/gcc/gimple-ssa-warn-access.cc: In function 'bool
check_nul_terminated_array(GimpleOrTree, tree, tree) [with GimpleOrTree =
gimple*]':
/home/slyfox/dev/git/gcc/gcc/gimple-ssa-warn-access.cc:338:21: note: 'r'
declared here
338 | int_range_max r (TREE_TYPE (bound));
| ^
In member function 'long int* wide_int_storage::write_val(unsigned int)',
inlined from 'void wi::copy(T1&, const T2&) [with T1 = wide_int_storage; T2
= generic_wide_int<wide_int_ref_storage<true, false> >]' at
/home/slyfox/dev/git/gcc/gcc/wide-int.h:2187:37,
inlined from 'wide_int_storage& wide_int_storage::operator=(const T&) [with
T = wi::hwi_with_prec]' at /home/slyfox/dev/git/gcc/gcc/wide-int.h:1247:12,
inlined from 'generic_wide_int<storage>&
generic_wide_int<T>::operator=(const T&) [with T = wi::hwi_with_prec; storage =
wide_int_storage]' at /home/slyfox/dev/git/gcc/gcc/wide-int.h:1002:23,
inlined from 'void irange_bitmask::set_unknown(unsigned int)' at
/home/slyfox/dev/git/gcc/gcc/value-range.h:185:27,
inlined from 'virtual void irange::set_varying(tree)' at
/home/slyfox/dev/git/gcc/gcc/value-range.h:1245:25,
inlined from 'int_range<N, RESIZABLE>::int_range(tree) [with unsigned int N
= 3; bool RESIZABLE = true]' at
/home/slyfox/dev/git/gcc/gcc/value-range.h:1207:15,
inlined from 'bool check_nul_terminated_array(GimpleOrTree, tree, tree)
[with GimpleOrTree = tree_node*]' at
/home/slyfox/dev/git/gcc/gcc/gimple-ssa-warn-access.cc:338:21:
/home/slyfox/dev/git/gcc/gcc/wide-int.h:1272:73: error: 'r.int_range<3,
true>::<unnamed>.irange::m_bitmask.irange_bitmask::m_value.generic_wide_int<wide_int_storage>::<unnamed>.wide_int_storage::u.wide_int_storage::<unnamed
union>::valp' may be used uninitialized [-Werror=maybe-uninitialized]
1272 | return UNLIKELY (precision > WIDE_INT_MAX_INL_PRECISION) ? u.valp :
u.val;
|
^~~
/home/slyfox/dev/git/gcc/gcc/gimple-ssa-warn-access.cc: In function 'bool
check_nul_terminated_array(GimpleOrTree, tree, tree) [with GimpleOrTree =
tree_node*]':
/home/slyfox/dev/git/gcc/gcc/gimple-ssa-warn-access.cc:338:21: note: 'r'
declared here
338 | int_range_max r (TREE_TYPE (bound));
| ^
In member function 'long int* wide_int_storage::write_val(unsigned int)',
inlined from 'void wi::copy(T1&, const T2&) [with T1 = wide_int_storage; T2
= generic_wide_int<wide_int_ref_storage<true, false> >]' at
/home/slyfox/dev/git/gcc/gcc/wide-int.h:2187:37,
inlined from 'wide_int_storage& wide_int_storage::operator=(const T&) [with
T = wi::hwi_with_prec]' at /home/slyfox/dev/git/gcc/gcc/wide-int.h:1247:12,
inlined from 'generic_wide_int<storage>&
generic_wide_int<T>::operator=(const T&) [with T = wi::hwi_with_prec; storage =
wide_int_storage]' at /home/slyfox/dev/git/gcc/gcc/wide-int.h:1002:23,
inlined from 'void irange_bitmask::set_unknown(unsigned int)' at
/home/slyfox/dev/git/gcc/gcc/value-range.h:185:27,
inlined from 'virtual void irange::set_varying(tree)' at
/home/slyfox/dev/git/gcc/gcc/value-range.h:1245:25,
inlined from 'int_range<N, RESIZABLE>::int_range(tree) [with unsigned int N
= 3; bool RESIZABLE = true]' at
/home/slyfox/dev/git/gcc/gcc/value-range.h:1207:15,
inlined from 'bool check_nul_terminated_array(GimpleOrTree, tree, tree)
[with GimpleOrTree = gcall*]' at
/home/slyfox/dev/git/gcc/gcc/gimple-ssa-warn-access.cc:338:21:
/home/slyfox/dev/git/gcc/gcc/wide-int.h:1272:73: error: 'r.int_range<3,
true>::<unnamed>.irange::m_bitmask.irange_bitmask::m_value.generic_wide_int<wide_int_storage>::<unnamed>.wide_int_storage::u.wide_int_storage::<unnamed
union>::valp' may be used uninitialized [-Werror=maybe-uninitialized]
1272 | return UNLIKELY (precision > WIDE_INT_MAX_INL_PRECISION) ? u.valp :
u.val;
|
^~~
/home/slyfox/dev/git/gcc/gcc/gimple-ssa-warn-access.cc: In function 'bool
check_nul_terminated_array(GimpleOrTree, tree, tree) [with GimpleOrTree =
gcall*]':
/home/slyfox/dev/git/gcc/gcc/gimple-ssa-warn-access.cc:338:21: note: 'r'
declared here
338 | int_range_max r (TREE_TYPE (bound));
| ^
cc1plus: all warnings being treated as errors
make[3]: *** [Makefile:1218: gimple-ssa-warn-access.o] Error 1
make[3]: Leaving directory '/tmp/gb/gcc'
make[2]: *** [Makefile:5182: all-stage2-gcc] Error 2
make[2]: Leaving directory '/tmp/gb'
make[1]: *** [Makefile:27402: stage2-bubble] Error 2
make[1]: Leaving directory '/tmp/gb'
make: *** [Makefile:1140: all] Error 2
$ /tmp/gb/./prev-gcc/xg++ -B/tmp/gb/./prev-gcc/ -v
Reading specs from /tmp/gb/./prev-gcc/specs
COLLECT_GCC=/tmp/gb/./prev-gcc/xg++
COLLECT_LTO_WRAPPER=/tmp/gb/./prev-gcc/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/slyfox/dev/git/gcc/configure --disable-multilib :
(reconfigured) /home/slyfox/dev/git/gcc/configure --disable-multilib
--enable-checking=release
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 17.0.0 20260819 (experimental) (GCC)