BUG: YIELDQQ and /MW Cause F2616 Error (84623)
The information in this article applies to:
- Microsoft FORTRAN Compiler for MS-DOS 5.1
- Microsoft FORTRAN compiler for OS/2 5.1
This article was previously published under Q84623 SYMPTOMS
Code containing a call to the subroutine YIELDQQ compiled with the /MWn
option, where n is not 0, may cause the Microsoft FORTRAN Compiler version
5.1 to generate the following error:
error F2616: YIELDQQ : illegal use of function or subroutine
CAUSE
Compiling QuickWin programs with /MWn (n not equal to 0) causes the
compiler to insert calls to a function YIELDQQ() in different locations
throughout the code depending on the value of n. The compiler sees these
calls to the YIELDQQ function, and thereafter considers the YIELDQQ symbol
to be a reference to a function instead of a subroutine. This is despite
the INTERFACE statement in the file FLIB.FI describing YIELDQQ as a
subroutine. The compiler subsequently reports this perceived inconsistency
with the F2616 error.
RESOLUTION
The easiest solution is to compile with /MW0 to suppress all compiler
generated calls to the YIELDQQ function. Alternatively, all calls to the
subroutine YIELDQQ within the code may be removed or modified to call
YIELDQQ as a function instead of a subroutine. In this case, if the
compiler option /MWn is used (n greater than zero), the INTERFACE statement
in FLIB.FI must be modified to declare YIELDQQ as a function instead of a
subroutine if an explicit function call to YIELDQQ is made before the
compiler inserts a YIELDQQ function call.
STATUS
Microsoft has confirmed this to be a problem in Microsoft FORTRAN version
5.1.
This is not an issue in FORTRAN PowerStation because the /MW option is not
supported.
Modification Type: | Major | Last Reviewed: | 10/23/2003 |
---|
Keywords: | KB84623 |
---|
|