Dear colleagues,
I made the experience that errors labelled 'Access Violation' are most difficult to overcome. When such an error occurs in a huge program, it takes normally very long to correct. My first question is therefore whether it would be possible in the future to add some more information.
Such an error happened, when I ran a (huge) problem with the option /DREAL. I have condensed the problem to a few lines, in which I cannot find an error. Access Violation is reported when line 36 is uncommented, whereas no error is reported when it is commented out, althought line 35 and 36 are similar. This error does not occur without the option /DREAL.
Please note that it is not the problem to overcome the error in this (meaningless) program but to ensure that a similar problem does not occur in a much more complicated program environment.
My second question is whether this is a compiler problem with the /DREAL option or a programming error.
Best regards,
Klaus Lassmann
The test consists of the files COMMON Test52.for Run.bat and comp.lis:
Common /b00/ nwrite
Double Precision Fpcre3
Common / FisPro_b / Fpcre3 ( 2 )
! ==================================================================
! Save Statement
Save
Winapp
Program Test52
Include 'Common'
nwrite = 10
Open ( Unit = nwrite, File = 'Test52.out' )
Fpcre3 (1) = 1.d+00
Fpcre3 (2) = 2.d+00
Call Fwrit0_6
End Program Test52
! ------------------------------------------------------------------
Real Function Fgr_rel3 ( i )
Include 'COMMON'
Fgr_rel3 = + Fpcre3 (i)
Return
End
! ------------------------------------------------------------------
Subroutine FWRIT0_6
INCLUDE 'COMMON'
Do i = 1,2
ii = i
write (nwrite, * ) Fgr_rel3 ( ii ) ! OK
write (nwrite, * ) - Fgr_rel3 ( ii ) ! OK
write (nwrite, * ) + Fgr_rel3 ( ii ) ! access violation
end do
return
end
del comp.lis
del *.obj
del *.exe
ftn95 Test52.for /Dreal /checkmate /Link >> comp.lis
sdbg Test52.exe
[FTN95/Win32 Ver. 5.50.0 Copyright (c) Silverfrost Ltd 1993-2010]
Licensed to: Institut für Transurane, Karlsruhe
Organisation: Europäische Kommission
NO ERRORS [<TEST52> FTN95/Win32 v5.50.0]
NO ERRORS [<FGR_REL3> FTN95/Win32 v5.50.0]
NO ERRORS [<FWRIT0_6> FTN95/Win32 v5.50.0]
Creating executable: Test52.EXE