https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127635
Bug ID: 127635
Summary: [17 Regression] Profiled bootstrap fails with
uninitialized -Werror
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: build
Severity: normal
Priority: P3
Component: bootstrap
Assignee: unassigned at gcc dot gnu.org
Reporter: tnfchris at gcc dot gnu.org
Target Milestone: ---
On
- aarch64-none-linux-gnu
- arm-none-linux-gnueabihf
- x86_64-pc-linux-gnu
configured with --enable-checking=yes,rtl,extra && make profiledbootstrap -j
fails with
In file included from
/opt/buildAgent/work/505bfdd4dad8af3d/gcc/coretypes.h:494,
from
/opt/buildAgent/work/505bfdd4dad8af3d/gcc/simplify-rtx.cc:23:
/opt/buildAgent/work/505bfdd4dad8af3d/gcc/simplify-rtx.cc: In member function
'rtx_def* simplify_context::simplify_subreg(machine_mode, rtx, machine_mode,
poly_uint64)':
/opt/buildAgent/work/505bfdd4dad8af3d/gcc/simplify-rtx.cc:8964:48: error:
'*(unsigned int*)((char*)&int_outermode + offsetof(scalar_int_mode,
scalar_int_mode::m_mode))' may be used uninitialized
[-Werror=maybe-uninitialized]
8964 | && known_eq (byte, subreg_lowpart_offset (int_outermode,
int_innermode)))
|
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/buildAgent/work/505bfdd4dad8af3d/gcc/poly-int.h:1248:39: note: in
definition of macro 'known_eq'
1248 | #define known_eq(A, B) (!maybe_ne (A, B))
| ^
/opt/buildAgent/work/505bfdd4dad8af3d/gcc/simplify-rtx.cc:8935:19: note:
'*(unsigned int*)((char*)&int_outermode + offsetof(scalar_int_mode,
scalar_int_mode::m_mode))' was declared here
8935 | scalar_int_mode int_outermode, int_innermode;
| ^~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
in stageprofile-bubble
This is a false positive as the analyzer seems unable to see that if
is_a <.., &foo> passes that foo will be initialized.
Mine.