[Bug fortran/82653] New: Parameters assigned with functions (instead of literals) cannot be used in other modules

gebeele at hotmail dot com gcc-bugzilla@gcc.gnu.org
Sat Oct 21 19:07:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82653

            Bug ID: 82653
           Summary: Parameters assigned with functions (instead of
                    literals) cannot be used in other modules
           Product: gcc
           Version: 5.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gebeele at hotmail dot com
  Target Milestone: ---

Error message:

f951.exe: internal compiler error: in unquote_string, at fortran/module.c:1802
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
f951.exe: internal compiler error: Aborted

I think I was able to isolate the bug in a few lines in two files. The used
module (parameters.f90) is compiled. It contains parameters that have been
assigned not with literals, but with intrinsic functions. However, the module
that uses the parameters.f90 module is not compiled.

for this one it works >  gfortran -c parameters.f90
this does not work >    gfortran -c check_use_parameters.f90

parameters.f90

module parameters

    ! parameters defined using a function
    ! this module is compiled by GNU-Fortran
    character(len=1), parameter ::  NL=CHAR(10)          ! Unix end of line
    character(len=1), parameter ::  CR=CHAR(13)          ! DOS carriage-return

end module


check_use_parameters.f90

module check_use_parameters

    use parameters
    ! if inside the used module parameters where defined with a function
    ! GNU-Fortran CANNOT compile this module

    real :: x     ! this is just to write some other source code

end module


More information about the Gcc-bugs mailing list