forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Correct code rejected by compiler with /64 /opt

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
mecej4



Joined: 31 Oct 2006
Posts: 1886

PostPosted: Sun Mar 31, 2024 12:14 pm    Post subject: Correct code rejected by compiler with /64 /opt Reply with quote

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.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Mon Apr 01, 2024 9:09 am    Post subject: Reply with quote

mecej4

Many thanks for the bug report. It relates to optimisation number 40.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Mon Apr 01, 2024 4:06 pm    Post subject: Reply with quote

This failure has now been fixed for the next release of FTN95.

It turned out that the failure related to optimisation number 95.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group