replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Generic interfaces and /CHECKMATE
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 

Generic interfaces and /CHECKMATE

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



Joined: 05 Jul 2006
Posts: 301

PostPosted: Mon Mar 04, 2013 5:47 am    Post subject: Generic interfaces and /CHECKMATE Reply with quote

This program crashes when run with /CHECKMATE because c is thought to be undeclared, which is true but presumably irrelevant. The program works if c is one-dimensional or does not have a lower limit of 0. It also works if there is no interface (e.g., if s2 is called directly).

Code:
WINAPP
MODULE m
  INTERFACE s
   MODULE PROCEDURE s1
   MODULE PROCEDURE s2
  END INTERFACE s
CONTAINS
 SUBROUTINE s1 (c)
  CHARACTER(LEN=*), DIMENSION(:), INTENT(OUT) :: c
  c(:)='A'
 END SUBROUTINE s1
 SUBROUTINE s2 (c)
  CHARACTER(LEN=*), DIMENSION(:,:), INTENT(OUT) :: c
  c(:,:)='A'
 END SUBROUTINE s2
END MODULE m
PROGRAM p
 USE m, ONLY: s
 CHARACTER(LEN=1), DIMENSION(0:2,2) :: c
 CALL s (c(0:,:))
END PROGRAM p
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Mon Mar 04, 2013 2:40 pm    Post subject: Reply with quote

Thanks. I have logged this for investigation.

To avoid the false run time error report, use /UNDEF instead of /CHECKMATE.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


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

PostPosted: Sat Apr 06, 2013 4:57 pm    Post subject: Reply with quote

This bug has been fixed for the next release.
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