[Help] `-fallow-argument-mismatch` problem of basic packages (`fftpack5.1`, `quadpack`) that pre-support `fpm`

The -fallow-argument-mismatch problem of basic packages (fftpack, quadpack) that pre-support fpm, should it be a problem?

argument-mismatch problem links

  1. fortran-fans/fftpack at fftpack5.1 forked from certik/fftpack (github.com)
  2. brocolis/QuadPack (github.com)
  3. NCAR/ncl/issue#123: Build failure with gfortran 10 (github.com)
  4. GCC 10 Release Series Changes, New Features, and Fixes


Mismatches between actual and dummy argument lists in a single file are now rejected with an error. Use the new option -fallow-argument-mismatch to turn these errors into warnings; this option is implied with -std=legacy . -Wargument-mismatch has been removed.

Because gcc10 changes routine argument mismatches from warnings to errors by default, this affects fftpack5.1 and quadpack packages, so we need to tell gcc10 users to add flag:-fallow-argument-mismatch when adding fpm support to fftpack5.1 and quadpack, otherwise gcc will report an error.

Perhaps for us, it is relatively simple to add easy-to-use interfaces for fftpack5.1 and quadpack. Modifying the source code to eliminate the problem of argument mismatch requires high professional knowledge.
Should we treat this issue as a problem? :sweat_smile:

Related support

fpm links

  1. Managing flags · Issue #112 · fortran-lang/fpm (github.com)
  2. Draft - Compiler flags profiles by kubajj · Pull Request #498 · fortran-lang/fpm (github.com)
  3. fpm/fpm.toml at Draft - Compiler flags profiles by kubajj · Pull Request #498 · fortran-lang/fpm (github.com)

So far, we must rely on -fallow-argument-mismatch to use such fpm packages, and all need to be manually input --flag to the command line. This is not user friendly.
Can actions like fpm help these libraries solve this problem? For example, add such --flag option to fpm.toml.

fftpack different version

netlib/dfftpack1.0 (fftpack4.0) is different from fftpack5.1. The former does not have the problem of argument-mismatch, while the latter is an updated version with bugs revised and multi-dimensional fft support added.

fftpack4.0 fpm support

  1. brocolis/fftpack (github.com)
  2. fortran-fans/fftpack at fftpack4.0 (github.com)

Other links

  1. Add QUADPACK to fpm registry · Issue #43 · fortran-lang/fpm-registry (github.com)
  2. add fftpack package by zoziha · Pull Request #40 · fortran-lang/fpm-registry (github.com)

Yes, this option was one of the examples I gave to @lkedward and @kubajj to see if we can “teach” fpm natively to handle it.

So yes, I think we all agree we want this. Now it’s just how to best do it. If you want to help, see this PR Draft: initial implementation of implicit_none by certik · Pull Request #506 · fortran-lang/fpm · GitHub how to implement a new option in fpm.

1 Like