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 

Test_Overflow

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





PostPosted: Mon Dec 18, 2006 10:24 am    Post subject: Test_Overflow Reply with quote

The following problem reveals still a problem with integer overflow. I have run the case with FTN95 v5.0 and the bat file:

del comp.lis
del *.obj
del *.exe

ftn95 Test_Overflow.f95 /checkmate /underflow /link >> comp.lis
sdbg Test_Overflow.exe


The program is:

Winapp
Program Test_overflow

Implicit None

! For iKind = selected_int_kind (9) overflow works correctly
! ###########################################################

Integer , Parameter :: iKind = selected_int_kind (4)

Integer (iKind) :: i, k

write (*,*) ' Results of Program Test_overflow'
write (*,*) ' ================================'
write (*,*)

write (*,*) ' iKind = ', iKind
write (*,*) ' Huge (i) = ', Huge (i)
write (*,*)

! For the Do Loop index i = 5, an error message should be given and
! a program stop should occur;
! instead wrong values are given for the variable k; please see output.


k = 10_iKind
Do i = 1, 10
write (*,*) ' Do-Loop index i = ', i, ' Value of k = ', k
k = k * 10_iKind
End Do

write (*,*)
write (*,*) ' The results for Do Loop index = 5,6,...,10 are completely wrong!'
write (*,*) ' ################################################################'

End Program Test_overflow

Best regards

Klaus Lassmann
Back to top
PaulLaidler
Site Admin


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

PostPosted: Thu Dec 21, 2006 4:33 pm    Post subject: Reply with quote

Klaus

I can confirm that INTEGER*2 variables are not reporting an overflow with /CHECKMATE. I will log this as a bug that needs fixing.
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