GCC Gfortran 15.1.0 has a new bug that is
fixed in Gfortran 15.2.0 release
on any operating system (Windows, macOS, ...) that is triggered by -Wall
gfortran -Wall wall.f90 && ./a.out
wall.f90:38:12:
38 | call nexact(fprime) | 1 Error: Interface mismatch in dummy procedure 'fprime' at (1): Shape mismatch in argument '_formal_0'
This occurs regardless of the implied dimension(:)
or specific (even dimension(1)
) dimension of the parameter.
However, doing
gfortran wall.f90 && ./a.out
works and prints the expected "ok".
- Flang 20.1.6:
flang wall.f90
works ok--note that Flang doesn't have a-Wall
like flag yet. - Intel oneAPI 2024.0, 2025.1:
ifx -warn wall.f90
works OK
Working GFortran versions with gfortran -Wall wall.f90
include: 8.5.0, 9.3.0, 10.2.0, 11.2.0, 12.2.0, 13.2.0, 14.2.0
GCC's self-test for this issue: https://gcc.gnu.org/cgit/gcc/tree/gcc/testsuite/gfortran.dg/interface_60.f90?id=e7a2b8b76ae0c8f1e49c780aa82ebb5f0325f515