https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80666
--- Comment #2 from Jos de Kloe <kloedej at knmi dot nl> --- (In reply to Dominique d'Humieres from comment #1) > Why do you think this a bug in gfortran? > > The code compiles if you remove 'implicit none'. With it you have to define > 'keylen' before using it, as in you second test. We had the impression our code was correct since it compiles without problem with pgf90 and ifort and older gfortran versions. I understand that extra checks are added when the compiler evolves, and that the democratic argument is maybe not applicable here, so if you think there is a rule in the fortran standard that forbids this way of coding, feel free to point it out and we can close the bug. On the other hand, the main misunderstanding here I think is what defines the order of the definition of subroutine parameters. Is it the parameter list in the subroutine statement or is it the individual type declarations that follow it? It seems most logical in my eyes if the parameter list is the one that defines order of parameter definitions but I might be wrong. Is this defined in the fortran specification at all? I tried to find it in the "Fortran 95 Standard, final draft" document (from https://gcc.gnu.org/wiki/GFortranStandards), but the only thing I found was on page 230, lines 25-28. Here it only is stated that the length specification must be present, but nothing is said about the order in the dummy argument list. Finally I would not recommend coding fortran without 'implicit none' to anyone, that's a disaster waiting to happen.