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 

strange behaviour of the intrinsic "sum"

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



Joined: 29 Mar 2007
Posts: 28

PostPosted: Thu Apr 14, 2016 3:01 pm    Post subject: strange behaviour of the intrinsic "sum" Reply with quote

Hello Paul,
i need your help. Below i have embedded a little program, which demonstrates that something going wrong with the Salford Compiler V7.20.

Code:
program strange_bug
  implicit none
  integer, dimension(3) :: array = (/ 2, 1, 3 /)
  integer sum1, sum2, sum3, sum4, sum5, sum6             ! SALFORD         ! INTEL   14/4/2016
  sum1=-1; sum2=-1; sum3=-1; sum4=-1; sum5=-1; sum6=-1   ! ------------------------
  sum1 = sum(array(:), mask = array      .ne. 1 )        ! sum1 = 5        sum1 = 5
  sum2 = sum(array(:), mask = array       /=  1 )        ! sum2 = 5        sum2 = 5
  sum3 = sum(array(:), mask = array(2)   .ne. 1 )        ! sum3 = 1        sum3 = 0
  sum4 = sum(array(:), mask = array(2)    /=  1 )        ! sum4 = 3        sum4 = 0
  sum5 = sum(array(:), mask = array(3)   .ne. 1 )        ! sum5 = 2        sum5 = 6
  sum6 = sum(array(:), mask = array(3)    /=  1 )        ! sum6 = 3        sum6 = 6
  write(*,*) sum1, sum2, sum3, sum4, sum5, sum6
end program strange_bug


The results obtained using the Intel compiler seems to be OK. But the Salford results are very strange. Especially the differences between sum3 and sum4 and between sum5 and sum6
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Apr 14, 2016 4:32 pm    Post subject: Reply with quote

Thanks for the feedback. I have logged this for investigation.
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: Thu May 12, 2016 10:54 am    Post subject: Reply with quote

This bug has now been fixed for the next release (i.e. the one after 8.0).
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