Hi All, Harald, that is to say the least of it an elegant and minimalist fix. With the patch applied, gfortran behaves like the "other brand" and regtests OK.
Bernhard correctly points out that there should be a comment. Not only this, there must be an F2003 standard check, since F95 forbids over-riding of elemental intrinsics. I see as I am writing that Tobias has dealt with the point about module version. I agree entirely with Tobias. The fact that the patch is permissive in suppressing an incorrect error means that it cannot break anything. This patch, once modified as above, should be pushed to master right immediately and, since it affects F2003 compliance, backported to 10-branch. Many thanks, Harald - good work! Paul On Fri, 16 Apr 2021 at 08:41, Bernhard Reutner-Fischer via Fortran < fortran@gcc.gnu.org> wrote: > On Thu, 15 Apr 2021 22:52:01 +0200 > Harald Anlauf via Fortran <fortran@gcc.gnu.org> wrote: > > > Hello everybody, > > > > we currently write the interface for intrinsic procedures to module > > files although that should not be necessary. (F2018:15.4.2.1 actually > > states that interfaces e.g. of intrinsic procedures are 'explicit'.) > > This lead to bogus errors due to an apparently bogus ambiguity. > > A simple solution is to just avoid writing that (redundant) information > > to the module file. > > I'd put the standard reference you cite in a comment before the check. > > Does this change the module format in an incompatible way, i.e. does > this require a module format version bump? > > What happens when we read an existing module that names an intrinsic? > Without bumping the module version, we'd run into the same issue as > before, don't we? > > If we did not bump the module version yet for gcc-11 then i would > suggest to defer the patch for gcc-12 and bump then. > > Even if we'd skip reading existing intrinsic now, we'd break interop > with older compiler versions if we would stop writing them without > bumping the module format, i think? > > > Regtested on x86_64-pc-linux-gnu. OK for (current) mainline? > > Or rather wait after 11 release? > > > > Thanks, > > Harald > -- "If you can't explain it simply, you don't understand it well enough" - Albert Einstein