https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112909
Bug ID: 112909
Summary: [14 Regression] glibc -Wuninitialized build failure
for i686-gnu
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: jsm28 at gcc dot gnu.org
CC: aldyh at gcc dot gnu.org
Target Milestone: ---
Target: i?86-*-*
Created attachment 56829
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56829&action=edit
preprocessed source
What look like spurious -Wuninitialized errors were introduced building glibc
for i686-gnu (Hurd) by:
commit 602e824eec30a7c6792b8b27d61c40f1c1a2714c
Author: Aldy Hernandez <[email protected]>
AuthorDate: Thu Jun 29 11:27:49 2023 +0200
Commit: Aldy Hernandez <[email protected]>
CommitDate: Wed Jul 12 18:21:29 2023 +0200
[range-op] Enable value/mask propagation in range-op.
Compile the attached test for i686-gnu with -O2 -Wall -Werror (likely the issue
appears also as a regression for other targets, the source file in glibc that
this came from is Hurd-specific so it wouldn't have broken the glibc build for
other targets).
../sysdeps/mach/hurd/x86/trampoline.c: In function '_hurd_setup_sighandler':
../sysdeps/mach/hurd/x86/trampoline.c:108:22: error: 'scp' may be used
uninitialized [-Werror=maybe-uninitialized]
108 | struct sigcontext *scp;
| ^~~
../sysdeps/mach/hurd/x86/trampoline.c:353:34: error: 'args' may be used
uninitialized [-Werror=maybe-uninitialized]
353 | struct mach_msg_trap_args *args = (void *) state->basic.esp;
| ^~~~
cc1: all warnings being treated as errors
I don't see any way these variables can be used uninitialized, even taking into
account the use of setjmp in this function which could well be confusing
things.