IBM Support

LI75320: PREPROCESSOR ERROR WITH -QFPP=LINECONT

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When using -WF,-qfpp=linecont the compiler generates an error
    message.
    
    ===== TESTCASE:
    bkanneth@swgc23:/home/bkanneth/pmr/90491> cat macro_test.F90
    PROGRAM macro_test
    
    REAL, DIMENSION(3)  :: Vector1
    REAL, DIMENSION(3)  :: Vector2
    REAL :: Vector_Length
    
    WRITE(*,*) "This is the macro_test program"
    !
    !   Magnitude of a Vector
    !
    #define _VECTOR_MAG( A )  \
      SQRT( DOT_PRODUCT( A, A ) )
    !
    !    Normalize a Vector
    !
    #define _NORMALIZE(A )  \
      ( A )  /  _VECTOR_MAG( A )
    
    Vector1 = (/1,2,3/)
    Vector2 = (/4,5,6/)
    
    ! Following is the line that causes the compiler error/complaint
    ! it doesn't like the "&" as a line continuation
    
    Vector_Length = _VECTOR_MAG(Vector1 + &
                                           Vector2)
    WRITE(*,*) "Vector1:  ", Vector1
    WRITE(*,*) "Vector2:  ", Vector2
    WRITE(*,*) "Vector_Length:  ", Vector_Length
    
    END PROGRAM macro_test
    
    
    ===== ACTUAL OUTPUT:
    $xlf95_r macro_test.F90
    "macro_test.F90", line 25.16: 1515-019 (S) Syntax is incorrect.
    "macro_test.F90", line 26.30: 1515-019 (S) Syntax is incorrect.
    "macro_test.F90", line 26.30: 1515-018 (S) Incorrect character
    found in source at line 26 in column 30.  Hexadecimal value of
    character is 26.
    "macro_test.F90", line 26.51: 1515-018 (S) Incorrect character
    found in source at line 26 in column 51.  Hexadecimal value of
    character is 26.
    ** macro_test   === End of Compilation 1 ===
    1501-511  Compilation failed for file macro_test.F90.
    
    $xlf95_r -WF,-qfpp=linecont macro_test.F90
    "macro_test.F90", line 25.16: 1515-019 (S) Syntax is incorrect.
    "macro_test.F90", line 26.59: 1515-019 (S) Syntax is incorrect.
    ** macro_test   === End of Compilation 1 ===
    1501-511  Compilation failed for file macro_test.F90.
    
    ===Expected output:
    Should compile clean.
    

Local fix

  • Use -d in the compile line:
    
    $xlf95_r -WF,-qfpp=linecont -d macro_test.F90
    ** macro_test   === End of Compilation 1 ===
    1501-510  Compilation successful for file macro_test.F90.
    

Problem summary

  • USERS AFFECTED:
    Fortran programs that have macros which occupies more than 1
    line are affected by this issue.
    
    PROBLEM DESCRIPTION:
    When a macro occupies more than 1 line, the preprocessor
    expands the macro at the last line
    and causes the syntax error at compile time.
    

Problem conclusion

  • The preprocessor has been fixed to handle this macro situation.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI75320

  • Reported component name

    XL FORTRAN SLES

  • Reported component ID

    5724U8400

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-03-09

  • Closed date

    2010-04-27

  • Last modified date

    2010-04-27

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    LI75460 IZ76913 IZ84769

Fix information

  • Fixed component name

    XL FORTRAN SLES

  • Fixed component ID

    5724U8400

Applicable component levels

  • RC10 PSY

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSB259","label":"XL Fortran Advanced Edition for Linux"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"C.1","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
24 February 2022