mecej4
Joined: 31 Oct 2006 Posts: 1897
|
Posted: Sun Mar 31, 2024 12:14 pm Post subject: Correct code rejected by compiler with /64 /opt |
|
|
The following code contains a subroutine with a 1-dimensional array argument whose name is the same as that of an intrinsic function, INT.
Code: | subroutine elmhes(Nm,N,Low,Igh,A,Int)
implicit none
integer Igh, Low, N, Nm, i, j, m, mm1, Int(*)
real A(Nm,*), x, y
!
do m = Low + 1, Igh - 1
mm1 = m - 1
x = 0.0E0
i = m
Int(m) = i
if ( x == 0.0E0 ) cycle
!
do i = m+1, Igh
y = A(i,mm1)
if ( y /= 0.0E0 ) then
y = y/x
A(i,mm1) = y
do j = m, N
A(i,j) = A(i,j) - y*A(m,j)
end do
do j = 1, Igh
A(j,m) = A(j,m) + y*A(j,i)
end do
end if
end do
end do
return
end subroutine elmhes |
When the 9.02 compiler is given this code and the options /64 /opt are specified, a false syntax error report is issued:
Code: | S:\ALGO\SLATEC\src>ftn95 /64 /opt elm.f90
[FTN95/x64 Ver. 9.02.0.0 Copyright (c) Silverfrost Ltd 1993-2024]
ERROR S:\ALGO\SLATEC\src\elm.F90 22: Array INT appears in this expression as rank 2, but was declared as rank 1
1 ERROR [<ELMHES> FTN95 v9.02.0.0]
*** Compilation failed |
Please note that the symbol Int does not appear after line 10 of the source file. |
|