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 

SEQUENCE attribute error message

 
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: 268

PostPosted: Tue Jul 27, 2021 3:01 am    Post subject: SEQUENCE attribute error message Reply with quote

The following code consists of two modules and a program:
Code:
Module m1
   Type t
      Sequence
      Integer :: j
   End Type t
End Module m1

Module m2
Contains
 Function f(i, d)
   Use m1
   Integer :: f
   Integer, Intent(In) :: i
   Type(t), Intent(In), Optional :: d
   f = 0
   Return
 End Function f
End Module m2

Code:
Program p
   Use m2
   Print*, f(1)
End Program p

If the modules are stored in a different file from the program the following compilation error message is issued:
Quote:
error 634 - Passing an argument of a derived type, such as Entity[0], requires the type have the SEQUENCE attribute

which seems spurious, in part because derived-type t is actually given the SEQUENCE attribute, but also because the program does not even call the function with a derived-type argument anyway.

The error message disappears if:
1. the two modules are combined, while being kept in a separate file
2. everything is kept in one file

I am running FTN95 version 8.70, but am pretty sure the same problem occurs in 8.80.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Tue Jul 27, 2021 6:45 am    Post subject: Reply with quote

Simon

Thank you for the bug report. The failure goes back to at least v4.90 and probably has been there since the outset.

You can probably use /ignore 634 as a temporary work-around.
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: Tue Jul 27, 2021 9:24 am    Post subject: Reply with quote

This has now been fixed for the next release of FTN95.
Back to top
View user's profile Send private message AIM Address
simon



Joined: 05 Jul 2006
Posts: 268

PostPosted: Tue Jul 27, 2021 2:55 pm    Post subject: Reply with quote

Many thanks Paul. Using IGNORE 634 does avoid the problem for now.
Back to top
View user's profile Send private message
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