dftd4 and mctc-lib fail to compile in rawhide with gcc-gfortran-15.1.1-1.fc43 with an "Interface mismatch" error:
../app/argument.f90:114:53:
114 | call make_argument_list(new, argument_counter, argument_getter)
| 1
Error: Interface mismatch in dummy procedure ‘argument_getter’ at (1): ALLOCATABLE mismatch in argument '_formal_1'
../app/argument.f90:116:59:
116 | call make_argument_list(new, default_argument_count, get_default_argument)
| 1
Error: Interface mismatch in dummy procedure ‘argument_getter’ at (1): ALLOCATABLE mismatch in argument '_formal_1'
The codes in question use procedure pointers, which have been supported in at least four Fortran compilers for years. The error is only triggered when -Wall is present in the compiler flags.
<mock-chroot> sh-5.2# gfortran -c ../app/argument.f90
<mock-chroot> sh-5.2# gfortran -c -Wall ../app/argument.f90
../app/argument.f90:114:53:
114 | call make_argument_list(new, argument_counter, argument_getter)
| 1
Error: Interface mismatch in dummy procedure ‘argument_getter’ at (1): ALLOCATABLE mismatch in argument '_formal_1'
../app/argument.f90:116:59:
116 | call make_argument_list(new, default_argument_count, get_default_argument)
| 1
Error: Interface mismatch in dummy procedure ‘argument_getter’ at (1): ALLOCATABLE mismatch in argument '_formal_1'
I do not have a reduced test case, but the attached file from dftd4 is 364 lines and has no dependencies. The same codes compile in Fedora 41 and 40 without issues.
Reproducible: Always
Steps to Reproduce:
1. gfortran -c -Wall argument.f90
Actual Results:
Code does not compile
Expected Results:
Code compiles
See https://gcc.gnu.org/gcc-15/changes.html#fortran
"The -Wexternal-arguments-mismatch option has been added. This checks for mismatches between the argument lists in dummy external arguments, and is implied by -Wall and -fc-prototypes-external options."
dftd4 and mctc-lib fail to compile in rawhide with gcc-gfortran-15.1.1-1.fc43 with an "Interface mismatch" error: ../app/argument.f90:114:53: 114 | call make_argument_list(new, argument_counter, argument_getter) | 1 Error: Interface mismatch in dummy procedure ‘argument_getter’ at (1): ALLOCATABLE mismatch in argument '_formal_1' ../app/argument.f90:116:59: 116 | call make_argument_list(new, default_argument_count, get_default_argument) | 1 Error: Interface mismatch in dummy procedure ‘argument_getter’ at (1): ALLOCATABLE mismatch in argument '_formal_1' The codes in question use procedure pointers, which have been supported in at least four Fortran compilers for years. The error is only triggered when -Wall is present in the compiler flags. <mock-chroot> sh-5.2# gfortran -c ../app/argument.f90 <mock-chroot> sh-5.2# gfortran -c -Wall ../app/argument.f90 ../app/argument.f90:114:53: 114 | call make_argument_list(new, argument_counter, argument_getter) | 1 Error: Interface mismatch in dummy procedure ‘argument_getter’ at (1): ALLOCATABLE mismatch in argument '_formal_1' ../app/argument.f90:116:59: 116 | call make_argument_list(new, default_argument_count, get_default_argument) | 1 Error: Interface mismatch in dummy procedure ‘argument_getter’ at (1): ALLOCATABLE mismatch in argument '_formal_1' I do not have a reduced test case, but the attached file from dftd4 is 364 lines and has no dependencies. The same codes compile in Fedora 41 and 40 without issues. Reproducible: Always Steps to Reproduce: 1. gfortran -c -Wall argument.f90 Actual Results: Code does not compile Expected Results: Code compiles