re PR fortran/60751 (Extra comma in WRITE statement not diagnosed)

2016-06-11  Dominique d'Humieres  <dominiq@lps.ens.fr>

	PR fortran/60751
	* io.c (gfc_resolve_dt): Replace GFC_STD_GNU with GFC_STD_LEGACY.

	* gfortran.dg/comma_IO_extension_1.f90: New test.
	* gfortran.dg/comma_IO_extension_2.f90: Likewise.
	* gfortran.dg/array_constructor_49.f90: Remove extra comma in WRITE
	statement.
	* gfortran.dg/graphite/pr38083.f90: Likewise.
	* gfortran.dg/integer_exponentiation_6.F90: Likewise and add
	missing format.

--This line

M    fortran/ChangeLog
M    fortran/io.c
M    testsuite/ChangeLog
M    testsuite/gfortran.dg/array_constructor_49.f90
M    testsuite/gfortran.dg/graphite/pr38083.f90
M    testsuite/gfortran.dg/integer_exponentiation_6.F90

From-SVN: r237329
This commit is contained in:
Dominique d'Humieres 2016-06-11 21:19:43 +02:00 committed by Dominique d'Humieres
parent aa18f65ad4
commit d3dc025d96
6 changed files with 20 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2016-06-11 Dominique d'Humieres <dominiq@lps.ens.fr>
PR fortran/60751
* io.c (gfc_resolve_dt): Replace GFC_STD_GNU with GFC_STD_LEGACY.
2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
PR c/71381

View File

@ -3007,7 +3007,7 @@ gfc_resolve_dt (gfc_dt *dt, locus *loc)
}
if (dt->extra_comma
&& !gfc_notify_std (GFC_STD_GNU, "Comma before i/o item list at %L",
&& !gfc_notify_std (GFC_STD_LEGACY, "Comma before i/o item list at %L",
&dt->extra_comma->where))
return false;

View File

@ -1,3 +1,14 @@
2016-06-11 Dominique d'Humieres <dominiq@lps.ens.fr>
PR target/60751
* gfortran.dg/comma_IO_extension_1.f90: New test.
* gfortran.dg/comma_IO_extension_2.f90: Likewise.
* gfortran.dg/array_constructor_49.f90: Remove extra comma in WRITE
statement.
* gfortran.dg/graphite/pr38083.f90: Likewise.
* gfortran.dg/integer_exponentiation_6.F90: Likewise and add
missing format.
2016-06-11 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/case_character.adb: New test.

View File

@ -6,7 +6,7 @@
program t
integer :: ndim=2, ndfp=4, i
character (len=8) :: line
write (unit=line,fmt='(4I2)'), (/ ( i, i = 1, ndfp ) /) + ndim
write (unit=line,fmt='(4I2)') (/ ( i, i = 1, ndfp ) /) + ndim
if (line /= ' 3 4 5 6') call abort
end program t
! { dg-final { scan-tree-dump-times "__var" 3 "original" } }

View File

@ -8,7 +8,7 @@ SUBROUTINE IVSORT (IL,IH,NSEGS,IOUNIT)
10 IF (IL .GE. IH) GO TO 80
20 NSEGS = (IH + IL) / 2
IF (NSEGS .GT. MAXSGS) THEN
WRITE (IOUNIT),MAXSGS
WRITE (IOUNIT) MAXSGS
ENDIF
80 NSEGS = NSEGS - 1
90 IF (IH - IL .GE. 11) GO TO 20

View File

@ -1,4 +1,4 @@
! { dg-options "-fno-range-check" }
program test
write (*), (2_8 ** 64009999_8) / 2
write (*,*) (2_8 ** 64009999_8) / 2
end program test