[Bug fortran/46846] Bogus warning: "Interface mismatch in dummy procedure .* has the wrong number of arguments" for intrinsic functions with optional arguments
dominiq at lps dot ens.fr
gcc-bugzilla@gcc.gnu.org
Sat Dec 19 13:45:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46846
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-12-19
Summary|Warning of AINT as actual |Bogus warning: "Interface
|argument ain't right |mismatch in dummy procedure
| |.* has the wrong number of
| |arguments" for intrinsic
| |functions with optional
| |arguments
Ever confirmed|0 |1
--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
This PR is a real mess.
> lnblnk is a GNU extension.
> char, ichar, int, and len_trim are also rejected by other compilers.
I think gfortran is correct when rejecting the intrinsic functions in
Table 13.3: Restricted specific intrinsic functions
(Fortran 2015 draft).
> The problem is that all those functions have an optional KIND= argument -
> which, however, is not included in the specific functions (as backward
> compatibility to Fortran 77). Thus, the warning is bogus -
I agree and I have changed the summary.
> but another question is whether this can lead to wrong code by not passing
> NULL as second argument.
I did not find such wrong codes, however I have opened pr68433 for wrong codes
when including the optional argument in the interfaces.
> I have not checked, but maybe the documentation should also be improved
> (cf. James' posting to c.l.f)
If so, I think it deserves a separate PR.
More information about the Gcc-bugs
mailing list