We’ve seen this before, with I/O API stuff: see https://cjcoats.github.io/ioapi/ERRORS.html#gfort10: starting with Version 10, gfortran takes a particularly idiosyncratic interpretation of the (latest) Fortran-2018 Standard (not Fortran-90 nor Fortran-95).
You need to add the compile flag
-std=legacy
so that this interpretation does not cause a compile-error.