Flag to warning about shape/alignment-change of explicit shape arrays arguments
Jonatan Öström
jonatan.ostrom@fysik.su.se
Tue Jun 4 17:56:00 GMT 2019
Dear GCC developers, this is a feature request.
It would be nice to have a flag like -Wrealign (or -Wreshape or some better name) to warn when an array 'aa' doesn't match the dimensions given in an explicit shape formal argument 'bb'.
Example:
----------------------------------------------
real aa(10,10)
call explicit(aa)
...
subroutine explicit(bb)
real, intent(in) :: bb(5,20)
...
end subroutine
----------------------------------------------
Whenever bb(:,:) is possible with modules/interfaces, bb(a,b) could be warned about, i guess. I know that some people use this behavior in some cases, but it would be nice to be able to forbid it or warn about it.
Best regards,
Jonatan
More information about the Fortran
mailing list