Hi,
the following code is accepted by ifort 17.0.1. A warning or error for line 6 would be perfect. The contradictory double definition in line 9 is checked and an error is given, but line 6 is accepted.
program array_definition use ISO_FORTRAN_ENV, only : rk => real64 implicit none ! Variables real(rk), dimension(10) :: foo(10) ! this shouldn't work, should it? --> no error or warning is given !real(rk), dimension(10) :: foo(20) ! this shouldn't work also! And it works not... ! 1>------ Build started: Project: array_definition, Configuration: Debug Win32 ------ ! 1>Compiling with Intel(R) Visual Fortran Compiler 17.0.1.143 [IA-32]... ! 1>array_definition.f90 ! 1>D:\02_Fortran\99_test\array_definition\array_definition.f90(7): error #6417: The dimensions of this array have been defined more than once. [FOO] ! 1>D:\02_Fortran\99_test\array_definition\array_definition.f90(6): remark #7712: This variable has not been used. [FOO] ! 1>compilation aborted for D:\02_Fortran\99_test\array_definition\array_definition.f90 (code 1) end program array_definition
Maybe it is easy to implement?
Kind regards, Johannes