FIX: F1001 '@(#)ctypes.c:1.11', Holleriths, Line 467
ID: Q77482
|
4.00 4.01 4.10 5.00 5.10 | 4.10 5.00 5.10
MS-DOS | OS/2
kbtool kbfixlist kbbuglist kberrmsg kbcode
----------------------------------------------------------------------
The information in this article applies to:
- Microsoft FORTRAN for MS-DOS, versions 4.0, 4.01, 4.1, 5.0, and 5.1
- Microsoft FORTRAN for OS/2, versions 4.1, 5.0, and 5.1
----------------------------------------------------------------------
SYMPTOMS
========
A FORTRAN program that appends a Hollerith constant consisting of five or
more characters to a string may cause the compiler to generate an internal
compiler error.
FORTRAN 5.1 under OS/2 and DOS:
fatal error F1001: Internal Compiler Error
(compiler file '@(#)ctypes.c:1.12', line 467)
FORTRAN 5.0 under OS/2 and DOS:
fatal error F1001: Internal Compiler Error
(compiler file '@(#)ctypes.c:1.11', line 467)
FORTRAN 4.1 under OS/2, and FORTRAN 4.1 and 4.01 under DOS:
fatal error F1001: Internal Compiler Error
(compiler file '@(#)ctypes.c:1.89', line 447)
FORTRAN 4.0 and 4.0a under DOS:
fatal error F1001: Internal Compiler Error
(compiler file '@(#)ctypes.c:1.80', line 445)
RESOLUTION
==========
The Hollerith descriptor is mainly intended to be used within a FORMAT
specifier. However, it should be able to be used in any context where
character constants can be used.
To avoid this internal compiler error, add the Hollerith constant to the
FORMAT statement instead of the character variable assignment.
Sample code #2 below illustrates this solution.
STATUS
======
Microsoft has confirmed this to be a problem in Microsoft FORTRAN versions
4.0, 4.01, 4.1, 5.0, and 5.1. This problem was corrected in FORTRAN
PowerStation, version 1.0.
MORE INFORMATION
================
Compiling the following code produces an internal compiler error:
Sample Code #1
--------------
c Compile options needed: none
WRITE (*, '(17H FORTRAN Compiler)') ! This is OK
PRINT *, 'MS ' // 4HFort ! This works fine
PRINT *, 'MS ' // 5HFortr ! F1001 Generated here
END
The same problem happens if you increase the number of characters on
the Hollerith constant.
A possible solution to this problem is to append the string and
Hollerith constant in a FORMAT specifier. An alternative is to define
the whole string inside the FORMAT and then write it out.
The following code illustrates these solutions:
Sample Code #2
--------------
CHARACTER*4 String
String = ' MS '
100 FORMAT ( A4 , 10HC Compiler) ! appending the string
c in FORMAT specifier
200 FORMAT (' MS ' 16HFortran Compiler) ! defining entire string
c inside the FORMAT
PRINT 100, String
PRINT 200
END
Additional reference words: 4.00 4.10 5.00 5.10 fixlist1.00 buglist5.10
buglist5.00 buglist4.10 buglist4.01 buglist4.00
KBCategory: kbtool kbfixlist kbbuglist kberrmsg kbcode
KBSubcategory: FLIss
Keywords :
Version :
Platform :
Issue type :
Last Reviewed: January 25, 1995