This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gfortran allows variable to be declared twice


The code

function foo(fp, m) result(ft)real   , intent(in) :: fp(m)
integer, intent(in) :: m
integer             :: m
ft = 0.0

end function foo

declares "m" twice, but GNU Fortran (GCC) 7.0.1 20170122 (experimental) on Windows 10 compiles it.
If fp(m) is replace by fp, gfortran catches the error.

Thanks to the gfortran developers for their efforts.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]