FIX: PARAMETER Strings Cause Compiler to Hang (80315)



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 Q80315

SYMPTOMS

Compiling code that contains complicated PARAMETER statements involving strings concatenated with strings from prior PARAMETER statements may cause the compiler to hang the machine or generate a protection violation under OS/2.

RESOLUTION

The complexity of the string expressions in the PARAMETER statements must be reduced.

STATUS

Microsoft has confirmed this to be a bug in the products listed above. This problem was corrected in FORTRAN PowerStation, version 1.0.

MORE INFORMATION

The following code can be used to reproduce the problem:

Sample code

      program test

      character * (*) zcrlf

      parameter ( zcrlf = char(13) // char(10) )

      character * (*)
     1   zglobal_fe_id

      parameter (
     1   zglobal_fe_id =
     1      ' GLOBAL.FE' // 
     1      ' $Date:$' // 
     1      ' $Revision:$'
     1   )

      character * (*)
     1   xpn_pathnamf_fe_id

      parameter (
     1   xpn_pathnamf_fe_id =
     1       ' PATHNAMF.FE' // 
     1       ' $Date:$' // 
     1       ' $Revision:$' // 
     1       zglobal_fe_id
     1   )

      character * (*)
     1   xch_charfunf_fe_id

      parameter (
     1   xch_charfunf_fe_id =
     1       ' CHARFUNF.FE' // 
     1       ' $Date:$' // 
     1       ' $Revision:$' // 
     1       zglobal_fe_id
     1   )

      character * (*)
     1   xfn_filenamf_fe_id

      parameter (
     1   xfn_filenamf_fe_id =
     1       ' FILENAMF.FE' // 
     1       ' $Date:$' // 
     1       ' $Revision:$' // 
     1       xpn_pathnamf_fe_id // 
     1       zglobal_fe_id
     1   )

      character * (*)
     1   xmc_mktctlf_fe_id

      parameter (
     1   xmc_mktctlf_fe_id =
     1       ' MKTCTLF.FE' // 
     1       ' $Date:$' // 
     1       ' $Revision:$' // 
     1       xfn_filenamf_fe_id // 
     1       xpn_pathnamf_fe_id // 
     1       zglobal_fe_id
     1   )

      character * (*)
     1   xdb_dbiof_fe_id

      parameter (
     1   xdb_dbiof_fe_id =
     1       ' DBIOF.FE' // 
     1       ' $Date:$' // 
     1       ' $Revision:$' // 
     1       xch_charfunf_fe_id // 
     1       xfn_filenamf_fe_id // 
     1       xmc_mktctlf_fe_id // 
     1       zglobal_fe_id
     1   )

      character * (*) yscb_fi_id

      parameter (
     1   yscb_fi_id = zcrlf // 
     1        ' SCB.FI' // 
     1        ' $Date:$' // 
     1        ' $Revision:$' // 
     1        xdb_dbiof_fe_id // 
     1        xfn_filenamf_fe_id // 
     1        xpn_pathnamf_fe_id // 
     1        zglobal_fe_id
     1   )

      end
				

Modification Type:MajorLast Reviewed:10/23/2003
Keywords:kbfix KB80315