[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

Description

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)
3 Likes

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