The following code example provides an access viloation error on execution when compiled with [color=red:052a04c8a7]ftn95 /64 /check[/color:052a04c8a7] and linked with [color=red:052a04c8a7]slink64[/color:052a04c8a7] With [color=red:052a04c8a7]/-check[/color:052a04c8a7] it works well. With [color=red:052a04c8a7]/-64[/color:052a04c8a7] and [color=red:052a04c8a7]slink[/color:052a04c8a7] it's also ok.
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
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 [color=red:052a04c8a7]/64[/color:052a04c8a7] is used and which not occurs with [color=red:052a04c8a7]/-64[/color:052a04c8a7].
I'm using ftn95 version 8.71.0.0.