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

2017-10-21 Thread gebeele at hotmail dot com
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

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

2017-10-22 Thread gebeele at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82653

Gustavo Baños Lapuente  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #2 from Gustavo Baños Lapuente  ---
Dominique is right. I hadn't my gfortran compiler updated. Once upgraded to
gfortran 6.3 (the one available in MinGW), the feature works.
I change the status to resolved/invalid.
Sorry and thanks.
Gustavo.