Skip to content

compilation fails with gfortran 12.1.0 #23

@jornbr

Description

@jornbr

With gfortran 12.1.0 a large number of errors like one below are reported. Compilation thus does not succeed.

.../GSW-Fortran/modules/gsw_mod_check_data.f90:781:30:

781 | "C_from_SP", 6.1638e-10_r8, (/ &
| 1
Error: The rank of the element in the structure constructor at (1) does not match that of the component (1/2)

It seems that this gfortran release does not like 1D data to be assigned to a 2D array. This is not a problem for earlier gfortran releases, nor for intel fortran. I'm not sure whether gfortran 12 is overly strict in its interpretation of the Fortran standards here, or the others are too lenient...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions