I'm working with some legacy Fortran code and discovered some warnings using compile-time caller-callee mismatch detection (ifort's -gen-interfaces -warn interfaces
). I received some warning in the following situations:
- The caller passes a variable
real*8 x
(i.e. scalar) to a subroutine, while the subroutine expects areal*8 x(1)
(i.e. an array) - The opposite from case 1: The caller passes a
real*8 x(1)
to a subroutine, while the subroutine declaresx
asreal*8 x
Now, is that acceptable? As far as I can see there is no problem with that, I'm I right? Or could there arise any problems?