https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128618
Bug ID: 128618
Summary: [17 Regression] r17-6022: All gfortran tests doing io
fail due to missing 64-bit atomics on 32-bit bare-iron
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libfortran
Assignee: unassigned at gcc dot gnu.org
Reporter: hp at gcc dot gnu.org
Target Milestone: ---
Host: x64_64-linux
Target: cris-elf
Not many systems match all of not having 64-bit atomic operations (32-bitters)
not having libatomic (newlib targets), and testing fortran.
Anyway, r17-6022 introduced use of 64-bit atomic operations guarded by
HAVE_ATOMIC_FETCH_ADD, but with the configure test for that macro enabled on
existence of atomic operations on int. This yields linker errors for all
gfortran tests linking in any of the affected code, causing about 3500
regressions:
Running /gcc/gcc/testsuite/gfortran.dg/c-interop/c-interop.exp ...
FAIL: gfortran.dg/c-interop/allocatable-dummy.f90 -O0 (test for excess
errors)
FAIL: gfortran.dg/c-interop/allocatable-dummy.f90 -O1 (test for excess
errors)
FAIL: gfortran.dg/c-interop/allocatable-dummy.f90 -O2 (test for excess
errors)
FAIL: gfortran.dg/c-interop/allocatable-dummy.f90 -O3 -fomit-frame-pointer
-funroll-loops -fpeel-loops -ftracer -finl\
ine-functions (test for excess errors)
FAIL: gfortran.dg/c-interop/allocatable-dummy.f90 -O3 -g (test for excess
errors)
FAIL: gfortran.dg/c-interop/allocatable-dummy.f90 -Os (test for excess
errors)
FAIL: gfortran.dg/c-interop/allocate-errors.f90 -O0 (test for excess errors)
FAIL: gfortran.dg/c-interop/allocate-errors.f90 -O1 (test for excess errors)
FAIL: gfortran.dg/c-interop/allocate-errors.f90 -O2 (test for excess errors)
FAIL: gfortran.dg/c-interop/allocate-errors.f90 -O3 -fomit-frame-pointer
-funroll-loops -fpeel-loops -ftracer -finline-functions (test for excess
errors)
FAIL: gfortran.dg/c-interop/allocate-errors.f90 -O3 -g (test for excess
errors)
FAIL: gfortran.dg/c-interop/allocate-errors.f90 -Os (test for excess errors)
FAIL: gfortran.dg/c-interop/allocate.f90 -O0 (test for excess errors)
FAIL: gfortran.dg/c-interop/allocate.f90 -O1 (test for excess errors)
(etc)
with gfortran.log:
FAIL: gfortran.dg/c-interop/allocatable-dummy.f90 -O0 (test for excess
errors)
Excess errors:
/gcc/libgfortran/io/io.h:1067:0: undefined reference to `__atomic_load_8'
/gcc/libgfortran/io/io.h:1055:0: undefined reference to `__atomic_store_8'
UNRESOLVED: gfortran.dg/c-interop/allocatable-dummy.f90 -O0 compilation
failed to produce executable
Patch about to be posted.