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 

Access violation with Character assignment

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
Thomas



Joined: 18 Feb 2005
Posts: 43
Location: Gummersbach, Germany

PostPosted: Fri Apr 23, 2021 9:58 am    Post subject: Access violation with Character assignment Reply with quote

The following code example provides an access viloation error on execution when compiled with
ftn95 /64 /check
and linked with
slink64
With /-check it works well. With /-64 and slink it's also ok.
Code:

Program WTPD12
Implicit None

Character (LEN=16), External :: WTPB03
Character (LEN=16)           :: BEZE(20)
Integer                      :: ANZE, MSTAT

ANZE       = 1
MSTAT      = 1234
BEZE(ANZE) = WTPB03(MSTAT)

END

Character *16 Function WTPB03 (MSTAT)
Implicit None
Integer :: MSTAT
if (mstat > 0) then
   WTPB03 = 'x'
else
   WTPB03 = 'y'
endif
END

The code example is a simplification of a complex program system. Further simplification to
Code:

Program WTPD11
Implicit None

Character (LEN=16), External :: WTPB03
Character (LEN=16)           :: BEZE(20)
Integer                      :: ANZE

ANZE       = 1
BEZE(ANZE) = WTPB03()

END

Character *16 Function WTPB03()
Implicit None
WTPB03 = 'x'
END

leads to a "internal compiler error", when /64 is used and which not occurs with /-64.

I'm using ftn95 version 8.71.0.0.
_________________
Thomas
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Fri Apr 23, 2021 10:21 am    Post subject: Reply with quote

Thomas

Thank you for the feedback. I have made a note to check this out.
Back to top
View user's profile Send private message AIM Address
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Fri Apr 23, 2021 4:43 pm    Post subject: Reply with quote

Quote:
With /-check it works well. With /-64 and ...


what does the '-' sign mean ?
where can i find the related documentation ?
Ta.
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
Thomas



Joined: 18 Feb 2005
Posts: 43
Location: Gummersbach, Germany

PostPosted: Fri Apr 23, 2021 6:40 pm    Post subject: Reply with quote

The "-" overrules the default or the individual settings in the configuration.

With
ftn95 /config
you can define your individual FTN95 global configuration.

Regardless of these settings you can switch individual setting on
/option
or off
/-option.

I made use of this to clearly indicate which options were used during my compilation.

The "FTN95" in the Windows start menu gives the following advice:
Quote:
Many of the options have a corresponding opposite. For example /-INTL is the opposite of /INTL. If the default setting is changed by using the /CONFIG dialog, then there are occasions when you may wish to use the opposite option in order to temporarily restore the original default. The dialog indicates which options can be configured and hence have an opposite.

_________________
Thomas
Back to top
View user's profile Send private message Visit poster's website
DietmarSiepmann



Joined: 03 Jun 2013
Posts: 279

PostPosted: Mon Apr 26, 2021 9:06 am    Post subject: Reply with quote

John-Silver,

concerning the docu with respect to the - sign in a ftn95 option: you may use command
Code:
ftn95 /?

in a DOS command window to see the following information at the end of the online help displayed:
Code:

   To reset a configured option, precede the option name with '-', e.g.
       ftn95 file.f90 /-iso
   This will switch off the /ISO option, if it was currently switched
   on with one of the configuration methods.

Unfortunately I could not find this information in the online help window, section "Compiler Options" (using e.g. command ftn95 --help Sad.

Regards,
Dietmar
Back to top
View user's profile Send private message
Thomas



Joined: 18 Feb 2005
Posts: 43
Location: Gummersbach, Germany

PostPosted: Mon Apr 26, 2021 9:16 am    Post subject: Reply with quote

You can find the hint in the last paragraph at
Compiler options on a command line
as sub-section of
Compiler options
in the Help for FTN95 menu item for FTN95 in Windows.
_________________
Thomas
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Wed Apr 28, 2021 2:10 pm    Post subject: Reply with quote

This failure has now been fixed for the next release of FTN95.
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 -> 64-bit 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