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 

FTN95: Strange Error message

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
JvO



Joined: 18 Aug 2005
Posts: 15

PostPosted: Thu Sep 01, 2005 7:43 am    Post subject: FTN95: Strange Error message Reply with quote

The following program produces incorrect error message.
IMO the error is not with 'Z', but with 'C'
Code:

! [JvO] 2005-09-01 MVbits.f95
subroutine Mult(a, b, c)
integer, intent(IN) :: a, b
integer, intent(OUT) :: c

integer :: k
integer, dimension(0:2) :: x, y, z
integer, parameter :: D = 1023, T = 10, S = 2**T, T2 = 2*T

call mvbits(a, (/0,T,T2/), (/T,T,T+2/), x, 0)
call mvbits(b, (/0,T,T2/), (/T,T,T+2/), y, 0)
z = y(0) * x
z(1:2) = z(1:2) + y(1) * x(0:1)
z(2) = z(2) + y(2) * x(0)
do k = 0, 1
z(k+1) = z(k+1) + ibits(z(k), T, T)
z(k) = iand(z(k), D)
end do
call mvbits(z, 0, (/T,T,T+2/), c, (/0, T, T2/))
! c = z(0) + ishft(z(1), T) + ishft(z(2), T2)
end subroutine Mult

! D:FortranTestSalford>ftn95 /check mvbits
! [FTN95/Win32 Ver. 4.8.0 Copyright (C) Salford Software Ltd 1993-2005]
! 0019) call mvbits(z, 0, (/T,T,T+2/), c, (/0, T, T2/))
! *** Array expressions, such as the array 'Z', cannot be on the right hand side
! of scalar assignments
! 1 ERROR [<MULT> FTN95/Win32 v4.8.0]
! *** Compilation failed


[JvO]
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Fri Sep 02, 2005 12:40 am    Post subject: FTN95: Strange Error message Reply with quote

Thank you for the information.
Does it work if you use /IGNORE for this error?
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


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

PostPosted: Fri Sep 02, 2005 2:51 am    Post subject: FTN95: Strange Error message Reply with quote

I should have said, does the program work correctly if the error (incorrectly described by FTN95) is fixed?
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


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

PostPosted: Wed Sep 07, 2005 1:11 am    Post subject: FTN95: Strange Error message Reply with quote

This bug has now been fixed.
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 -> Support 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