NAG f95: Error: bar.f90, line 6: Array supplied for dummy IN (no. 1) of COPY too small g95: Error: Array argument at (1) is smaller than the dummy size gfortran: No error/warning. -------------------------- program main implicit none character :: digit_arr(10) call copy(digit_arr) contains subroutine copy(in) character, dimension(11) :: in, out end subroutine copy end program main -------------------------- Note: The other way round is ok, i.e. actual = 1:10, dummy = 1:8
Related to -fbounds-check, isn't it?
> Related to -fbounds-check, isn't it? As my initial bug is fixed: Warnung: Actual argument contains too few elements for dummy argument 'in' (10/11) at (1) and the missing parts are in PR30939, I dedicate it to the run time test. Test: Place program and subroutine in different files, compile and run them. NAG f95 -C=all shows then: Actual argument for dummy array IN too small - 10 elements instead of 11 Program terminated by fatal error In COPY, line 1 of aa.f90 Called by MAIN, line 4 of ab.f90
(In reply to comment #2) > I dedicate it to the run time test. > Test: Place program and subroutine in different files, compile and run them. > NAG f95 -C=all shows then: Same as PR27989. *** This bug has been marked as a duplicate of 27989 ***