https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122257
Bug ID: 122257
Summary: [16 Regression] gcc/fortran/resolve.cc:2301:31: error:
‘sym’ may be used uninitialized
[-Werror=maybe-uninitialized]
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: slyfox at gcc dot gnu.org
Target Milestone: ---
gfortran started failing builds on today's `master`. Might be related to
r16-4372-g52ee235811442e. Fails 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
-DIN_GCC_FRONTEND -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. -Ifortran -I/home/slyfox/dev/git/gcc/gcc
-I/home/slyfox/dev/git/gcc/gcc/fortran
-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 fortran/resolve.o -MT
fortran/resolve.o -MMD -MP -MF fortran/.deps/resolve.TPo
/home/slyfox/dev/git/gcc/gcc/fortran/resolve.cc
/home/slyfox/dev/git/gcc/gcc/fortran/resolve.cc: In function 'bool
resolve_actual_arglist(gfc_actual_arglist*, procedure_type, bool)':
/home/slyfox/dev/git/gcc/gcc/fortran/resolve.cc:2301:31: error: 'sym' may be
used uninitialized [-Werror=maybe-uninitialized]
2301 | && sym->attr.flavor == FL_PROCEDURE
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/home/slyfox/dev/git/gcc/gcc/fortran/resolve.cc:2033:15: note: 'sym' was
declared here
2033 | gfc_symbol *sym;
| ^~~
$ prev-gcc/xgcc -Bprev-gcc -v
Reading specs from prev-gcc/specs
COLLECT_GCC=prev-gcc/xgcc
COLLECT_LTO_WRAPPER=prev-gcc/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/slyfox/dev/git/gcc/configure --disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 16.0.0 20251011 (experimental) (GCC)