View previous topic :: View next topic |
Author |
Message |
Thomas
Joined: 18 Feb 2005 Posts: 47 Location: Gummersbach, Germany
|
Posted: Fri Apr 23, 2021 9:58 am Post subject: Access violation with Character assignment |
|
|
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 |
|
 |
PaulLaidler Site Admin

Joined: 21 Feb 2005 Posts: 7774 Location: Salford, UK
|
Posted: Fri Apr 23, 2021 10:21 am Post subject: |
|
|
Thomas
Thank you for the feedback. I have made a note to check this out. |
|
Back to top |
|
 |
John-Silver

Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Fri Apr 23, 2021 4:43 pm Post subject: |
|
|
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 ... " |
|
Back to top |
|
 |
Thomas
Joined: 18 Feb 2005 Posts: 47 Location: Gummersbach, Germany
|
Posted: Fri Apr 23, 2021 6:40 pm Post subject: |
|
|
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 |
|
 |
DietmarSiepmann
Joined: 03 Jun 2013 Posts: 279
|
Posted: Mon Apr 26, 2021 9:06 am Post subject: |
|
|
John-Silver,
concerning the docu with respect to the - sign in a ftn95 option: you may use command
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 .
Regards,
Dietmar |
|
Back to top |
|
 |
Thomas
Joined: 18 Feb 2005 Posts: 47 Location: Gummersbach, Germany
|
Posted: Mon Apr 26, 2021 9:16 am Post subject: |
|
|
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 |
|
 |
PaulLaidler Site Admin

Joined: 21 Feb 2005 Posts: 7774 Location: Salford, UK
|
Posted: Wed Apr 28, 2021 2:10 pm Post subject: |
|
|
This failure has now been fixed for the next release of FTN95. |
|
Back to top |
|
 |
|