https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123446
Bug ID: 123446
Summary: [16 Regression] Build broken since
r16-6515-ge32c3fb4311bca for non-__GTHREADS_CXX0X
targets
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libfortran
Assignee: unassigned at gcc dot gnu.org
Reporter: hp at gcc dot gnu.org
CC: tkoenig at gcc dot gnu.org
Target Milestone: ---
Since (r16-6514-g5376cb84aa1eee..r16-6519-g56dd47c073cabf], but surely due to
r16-6515-ge32c3fb4311bca, my autotester for cris-elf complains that the build
is broken (beware of cutnpastos and broken lines):
libtool: compile: /obj/./gcc/xgcc -B/obj/./gcc/ -nostdinc
-B/obj/cris-elf/newlib/ -isystem /obj/cris-elf/newlib/targ-\
include -isystem /src/newlib/libc/include -B/obj/cris-elf/libgloss/cris
-L/obj/cris-elf/libgloss/libnosys -L/src/libgl\
oss/cris -Bpre/cris-elf/bin/ -Bpre/cris-elf/lib/ -isystem pre/cris-elf/include
-isystem pre/cris-elf/sys-include -DHAV\
E_CONFIG_H -I. -I/src/libgfortran -iquote/src/libgfortran/io
-I/src/libgfortran/../gcc -I/src/libgfortran/../gcc/confi\
g -I../.././gcc -I/src/libgfortran/../libgcc -I../libgcc
-I/src/libgfortran/../libbacktrace -I../libbacktrace -I../lib\
backtrace -std=gnu11 -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -Wextra -Wwrite-strings -We\
rror=implicit-function-declaration -Werror=vla -fcx-fortran-rules
-ffunction-sections -fdata-sections -g -O2 -MT io/un\
it.lo -MD -MP -MF io/.deps/unit.Tpo -c /src/libgfortran/io/unit.c -o io/unit.o
In file included from /src/libgfortran/io/unit.c:30:
/src/libgfortran/io/unit.c: In function 'insert_unit':
/src/libgfortran/io/async.h:381:35: error: 'gfc_unit' has no member named
'self'
381 | LOCK (&(unit)->lock); (unit)->self = __gthread_self (); \
| ^~
/src/libgfortran/io/unit.c:250:3: note: in expansion of macro 'LOCK_UNIT'
250 | LOCK_UNIT (u);
| ^~~~~~~~~
/src/libgfortran/io/async.h:381:44: error: implicit declaration of function
'__gthread_self'; did you mean '__gthread_\
once'? [-Wimplicit-function-declaration]
381 | LOCK (&(unit)->lock); (unit)->self = __gthread_self (); \
| ^~~~~~~~~~~~~~
/src/libgfortran/io/unit.c:250:3: note: in expansion of macro 'LOCK_UNIT'
250 | LOCK_UNIT (u);
| ^~~~~~~~~
(further errors elided)
Looks like that commit was not tested on systems for which the #ifdef around
the introduced self member wasn't true, perhaps generally for non-gthreads
targets.