2. Revise the fortran.vim
Revise the lines 19,20,57 and 61 as:
19 setlocal indentkeys+==~subroutine,=~function,=~forall,=~program,=~module
20 setlocal indentkeys+==~endsubroutine,=~endfunction,=~endforall,=~endprogram,=~endmodule
57 if line =~? '^\s*\(pure\|elemental\)\=\s*\(subroutine\|function\|program\|module\)' ||
\ line =~? '^\s*\(forall\)'
61 if getline(v:lnum) =~? '^\s*end\s*\(subroutine\|function\|forall\|program\|module\)'
save it.
3. Create a .f90 source file and test the auto-indent for "program/function/module/subroutine", "do-loop" and "if-else".
You do not need to add any content in the _vimrc (or .vimrc) file.