FIX: Access Violation with Pass by Value and -Ox -G3Last reviewed: September 18, 1997Article ID: Q112011 |
1.00
WINDOWS NT
kbtool kbfixlist
The information in this article applies to:
SYMPTOMSUsing FORTRAN PowerStation for Windows NT to compile subprograms that pass arguments by value (either by using [C] or [VALUE]) may produce an "access violation" application error message box when compiling with both -G3 and - Ox.
CAUSEThis compile-time error appears to be caused by either passing mismatched arguments by value, or by passing expressions by value in the argument list.
RESOLUTIONWhen using -G3 and -Ox and passing by value, always match argument lengths and types and do not pass expressions.
STATUSMicrosoft has confirmed this to be a problem in Microsoft FORTRAN PowerStation for Windows NT, version 1.0. This problem was corrected in FORTRAN PowerStation 32, version 4.0.
MORE INFORMATIONThe following sample passes expressions by value, and will cause the compiler to generate an access violation when compiling with -G3 -Ox:
Sample Codec Compile options needed: -G3 -Ox c subroutine s[c](rr,r4,r8,rt,rs) real*8 r8 write(*,*) rr, r4, r8, rt,rs end real*8 r8 /0.d0/ r4 = 0. rr = 0. rs = 0. rt = 0. call s(rr, r4, r8, rt, rs) call s(rr, r4+1.0, r8-1.0, rt, rs) end |
Additional reference words: 1.00 Dr. Watson
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |