Commit a2f3eae2 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/50109 (Formatted namelist read with multiple "!" fails with:…

re PR fortran/50109 (Formatted namelist read with multiple "!" fails with: Cannot match namelist object name !)

2011-08-18  Tobias Burnus  <burnus@net-b.de>

        PR fortran/50109
        * io/list_read.c (eat_separator): Fix skipping over "!" lines.

2011-08-18  Tobias Burnus  <burnus@net-b.de>

        PR fortran/50109
        * gfortran.dg/namelist_73.f90: New.

From-SVN: r177858
parent 4dee9718
2011-08-18 Tobias Burnus <burnus@net-b.de>
PR fortran/50109
* gfortran.dg/namelist_73.f90: New.
2011-08-18 Jakub Jelinek <jakub@redhat.com>
* g++.dg/plugin/decl_plugin.c: Include diagnostic.h.
......
! { dg-do run }
!
! PR fortran/50109
!
! Contributed by Jim Hanson
!
program namelist_test
integer nfp
namelist /indata/ nfp
nfp = 99
open(unit=4, status='scratch')
write(4,'(a)') '$indata'
write(4,'(a)') 'NFP = 5,'
write(4,'(a)') "! "
write(4,'(a)') "! "
write(4,'(a)') "! "
write(4,'(a)') '/'
rewind(4)
read (4,nml=indata)
close(4)
! write(*,*) nfp
if (nfp /= 5) call abort()
end
2011-08-18 Tobias Burnus <burnus@net-b.de>
PR fortran/50109
* io/list_read.c (eat_separator): Fix skipping over "!" lines.
2011-07-23 Andreas Schwab <schwab@linux-m68k.org>
* intrinsics/ctime.c: Include <stdlib.h>.
......
......@@ -351,16 +351,7 @@ eat_separator (st_parameter_dt *dtp)
err = eat_line (dtp);
if (err)
return err;
if ((c = next_char (dtp)) == EOF)
return LIBERROR_END;
if (c == '!')
{
err = eat_line (dtp);
if (err)
return err;
if ((c = next_char (dtp)) == EOF)
return LIBERROR_END;
}
c = '\n';
}
}
while (c == '\n' || c == '\r' || c == ' ' || c == '\t');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment