!======================================================================= ! FILE: TEST41.F90 ! DATE: 21 July 2003 ! ! TEST: Illegal alias ! Should get diagnostic like: ! At line 8, ALIAS1(fileline 19) calls ALL_SUB.OP(fileline 5): ! ALIAS1() sends the same entity (A) as arguments 1 and 2, ! while ALL_SUB.OP()'s 1-st argument (X) has reference attribute ! "Write" ! ! Contact: Arnaud Desitter !======================================================================= module all_sub private public :: op contains subroutine op(x,y) implicit none real, intent(out), dimension(:) :: x real, intent(in), dimension(:) :: y x=2.0*y end subroutine op end module all_sub program alias1 use all_sub implicit none real, dimension(10) :: a a=1.0 ! illegal aliasing of dummy arguments, furthermore with different intent ! (known to cause problems with optimizing compilers) call op(a,a) print *, "Test41: Illegal alias of dummy arguments not detected." end program alias1