PRB: F1901 Error - Long Variable List in EQUIVALENCE Statement
ID: Q27986
|
The information in this article applies to:
-
Microsoft FORTRAN for MS-DOS, versions 4.01, 4.1, 5.0, 5.1
-
Microsoft FORTRAN for OS/2, versions 4.1, 5.0, 5.1
SYMPTOMS
An attempt to compile an application fails and the compiler generates
the following message:
F1901: program too large for memory
CAUSE
The application uses an EQUIVALENCE statement that contains a very large
list of variables. The FORTRAN compile stores data in the near heap. If
the data exhausts the available space, the F1901 error occurs.
RESOLUTION
To avoid this problem, use the high-capacity FORTRAN compiler to free
memory in the near heap. The high-capacity FORTRAN compiler is provided
with FORTRAN version 5.0 and later.
FORTRAN PowerStation can handle the example code in this article.
STATUS
This behavior is by design in FORTRAN. It is a restriction in the FORTRAN
compiler as documented in Appendix C of the FORTRAN "Reference" manual for
version 5.1 (page 409).
MORE INFORMATION
To use the high-capacity compiler, copy the F1L.EXE file from the FORTRAN
5.0 High-Capacity Compiler Disk into the FORTRAN BIN directory (by default,
C:\FORTRAN\BIN). Modify the compiler command line to specify the /B1
compiler option switch and the path to the high-capacity compiler. For
example, to compile the TEST.FOR source file with the high-capacity
compiler located in the default directory, use the following command line:
FL /B1 C:\FORTRAN\BIN\F1L.EXE TEST.FOR
The following code example demonstrates this problem.
Sample Code
C Compile options needed: None
IMPLICIT REAL*8 (A-Z)
EQUIVALENCE
+(A1, B1), (C1, D1), (E1, F1),
+(A2, B2), (C2, D2), (E2, F2),
+(A3, B3), (C3, D3), (E3, F3),
+(A4, B4), (C4, D4), (E4, F4),
+(A5, B5), (C5, D5), (E5, F5),
+(A6, B6), (C6, D6), (E6, F6),
+(A7, B7), (C7, D7), (E7, F7),
+(A8, B8), (C8, D8), (E8, F8),
+(A9, B9), (C9, D9), (E9, F9),
+(A10, B10), (C10, D10), (E10, F10),
+(A11, B11), (C11, D11), (E11, F11),
+(A12, B12), (C12, D12), (E12, F12),
+(A13, B13), (C13, D13), (E13, F13),
+(A14, B14), (C14, D14), (E14, F14),
+(A15, B15), (C15, D15), (E15, F15),
+(A16, B16), (C16, D16), (E16, F16),
+(A17, B17), (C17, D17), (E17, F17),
+(A18, B18), (C18, D18), (E18, F18),
+(A19, B19), (C19, D19), (E19, F19),
+(A20, B20), (C20, D20), (E20, F20),
+(A21, B21), (C21, D21), (E21, F21),
+(A22, B22), (C22, D22), (E22, F22),
+(A23, B23), (C23, D23), (E23, F23),
+(A24, B24), (C24, D24), (E24, F24),
+(A25, B25), (C25, D25), (E25, F25),
+(A26, B26), (C26, D26), (E26, F26),
+(A27, B27), (C27, D27), (E27, F27),
+(A28, B28), (C28, D28), (E28, F28),
+(A29, B29), (C29, D29), (E29, F29),
+(A30, B30), (C30, D30), (E30, F30),
+(A31, B31), (C31, D31), (E31, F31),
+(A32, B32), (C32, D32), (E32, F32),
+(A33, B33), (C33, D33), (E33, F33),
+(A34, B34), (C34, D34), (E34, F34),
+(A35, B35), (C35, D35), (E35, F35),
+(A36, B36), (C36, D36), (E36, F36),
+(A37, B37), (C37, D37), (E37, F37),
+(A38, B38), (C38, D38), (E38, F38),
+(A39, B39), (C39, D39), (E39, F39),
+(A40, B40), (C40, D40), (E40, F40),
+(A41, B41), (C41, D41), (E41, F41),
+(A42, B42), (C42, D42), (E42, F42),
+(A43, B43), (C43, D43), (E43, F43),
+(A44, B44), (C44, D44), (E44, F44),
+(A45, B45), (C45, D45), (E45, F45),
+(A46, B46), (C46, D46), (E46, F46),
+(A47, B47), (C47, D47), (E47, F47),
+(A48, B48), (C48, D48), (E48, F48),
+(A49, B49), (C49, D49), (E49, F49),
+(A50, B50), (C50, D50), (E50, F50),
+(A51, B51), (C51, D51), (E51, F51),
+(A52, B52), (C52, D52), (E52, F52),
+(A53, B53), (C53, D53), (E53, F53),
+(A43, B43), (C43, D43), (E43, F43),
+(A44, B44), (C44, D44), (E44, F44),
+(A45, B45), (C45, D45), (E45, F45),
+(A46, B46), (C46, D46), (E46, F46),
+(A47, B47), (C47, D47), (E47, F47),
+(A48, B48), (C48, D48), (E48, F48),
+(A49, B49), (C49, D49), (E49, F49),
+(A50, B50), (C50, D50), (E50, F50),
+(A51, B51), (C51, D51), (E51, F51),
+(A52, B52), (C52, D52), (E52, F52),
+(A53, B53), (C53, D53), (E53, F53),
+(A54, B54), (C54, D54), (E54, F54),
+(A55, B55), (C55, D55), (E55, F55),
+(A56, B56), (C56, D56), (E56, F56),
+(A57, B57), (C57, D57), (E57, F57),
+(A58, B58), (C58, D58), (E58, F58),
+(A59, B59), (C59, D59), (E59, F59),
+(A60, B60), (C60, D60), (E60, F60),
+(A61, B61), (C61, D61), (E61, F61),
+(A62, B62), (C62, D62), (E62, F62),
+(A63, B63), (C63, D63), (E63, F63),
+(A64, B64), (C64, D64), (E64, F64)
END
Additional query words:
4.01 4.10 5.00 5.10
Keywords :
Version : :4.01,4.1,5.0,5.1
Platform :
Issue type :