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

Andres Vidal <Andres.G.Vidal at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Andres.G.Vidal at gmail dot com

--- Comment #1 from Andres Vidal <Andres.G.Vidal at gmail dot com> ---
I'm recoding a program in Fortran 2008 and I am getting the error "Fortran
runtime error: Invalid string input" when reading a namelist. Only the part
that produces the issue is shown.

Computer: Mac OS X El Capitan
fortran version: 6.1 (through GNU web page)
Compilation command: gfortran -std=f2008 -fall-intrinsics -pedantic -O3 -m64 \
-msse2 -mfpmath=sse+387 -Waliasing -Wampersand -Wconversion -Wsurprising \
-Wc-binding-type -Wintrinsics-std -Wno-tabs -Wintrinsic-shadow
-Wline-truncation \
-Wtarget-lifetime -Wreal-q-constant -Wunused bug_cms.f08 -o bug_cms

Program:
program bug_cms

    use iso_fortran_env

    implicit none

    ! ibm.list
    character(200)        :: buoyancyFilename
    logical               :: buoyancy

    namelist /ibm/buoyancy, buoyancyFilename

    open(10, file='ibm.list', form='formatted')
    read(10, nml=ibm)

end program bug_cms


The file ibm.list is:
&ibm

! Adding buoyancy 
buoyancy        =.true.
buoyancyFilename="buoyancy_exampleā€¯

&end


Output:
At line 14 of file bug_cms.f08 (unit = 10, file = 'ibm.list')
Fortran runtime error: End of file

Error termination. Backtrace:
#0  0x10de69729
#1  0x10de6a3f5
#2  0x10de6ab59
#3  0x10df32f8b
#4  0x10df2e523
#5  0x10df36525
#6  0x10df36748
#7  0x10de5ee46
#8  0x10de5ee7e

Thanks a lot in advance for your help.

Reply via email to