Microsoft KB Archive/112011

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 11:27, 20 July 2020 by X010 (talk | contribs) (Text replacement - """ to """)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

PSS ID Number: 112011

Article Last Modified on 3/24/2000



The information in this article applies to:

  • Microsoft Fortran Powerstation 32 for Windows NT 1.0



This article was previously published under Q112011

SYMPTOMS

Using 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.

CAUSE

This compile-time error appears to be caused by either passing mismatched arguments by value, or by passing expressions by value in the argument list.

RESOLUTION

When using -G3 and -Ox and passing by value, always match argument lengths and types and do not pass expressions.

STATUS

Microsoft 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 INFORMATION

The following sample passes expressions by value, and will cause the compiler to generate an access violation when compiling with -G3 -Ox:

Sample Code

c 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 query words: 1.00 Dr. Watson

Keywords: kbbug kbCompiler KB112011
Technology: kbAudDeveloper kbFORTRANPower32100NT kbFortranSearch kbZNotKeyword2