On 03/06/2016 10:18 AM, Paul Richard Thomas wrote: > Dear All, > > These are two rather trivial modifications to permit, 'module' to > appear at any position in the list of prefixes in the procedure > declaration and to allow module procedures to appear within a module > contains section. I was rather astonished at this latter since it does > seem to be rather contrary to having an module interface declaration > for the same procedure. However, from the Fortran 2008 standard: > > C1247 (R1225) MODULE shall appear only in the function-stmt or > subroutine-stmt of a module subprogram or of a nonabstract interface > body that is declared in the scoping unit of a module or submodule. > > Whilst I was about it, I prevented an ICE from occurring following the > error generated by decl.c(copy_prefix), when prefixes in the interface > are repeated in the procedure declaration. I have not included a test > for this, since I am not convinced that repeating the prefixes is > strictly speaking an error. In fact, it would make a lot of sense to > repeat the interface declaration completely in the submodule > declaration. I will investigate further before committing. The fix is > even more trivial than preventing the ICE. > > Since the patch is entirely permissive, it will not prevent correct > code from compiling. In this sense, it is safe for stage 4. > > Bootstrapped and regtested on FC21/x86_64. OK for trunk? > > Best regards > > Paul > OK Paul, thanks for work.
Jerry