From: Dominique d'Humieres Date: Sat, 11 Jun 2016 19:19:43 +0000 (+0200) Subject: re PR fortran/60751 (Extra comma in WRITE statement not diagnosed) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d3dc025d96507c011a63edc328c8b8c898519e68;p=gcc.git re PR fortran/60751 (Extra comma in WRITE statement not diagnosed) 2016-06-11 Dominique d'Humieres 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 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 67bc9e88621..b557b34e862 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2016-06-11 Dominique d'Humieres + + PR fortran/60751 + * io.c (gfc_resolve_dt): Replace GFC_STD_GNU with GFC_STD_LEGACY. + 2016-06-10 Thomas Schwinge PR c/71381 diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index d538d845033..7c648e93cad 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -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; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 62d3450c767..0f17c46b304 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2016-06-11 Dominique d'Humieres + + 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 * gnat.dg/case_character.adb: New test. diff --git a/gcc/testsuite/gfortran.dg/array_constructor_49.f90 b/gcc/testsuite/gfortran.dg/array_constructor_49.f90 index ca963d3ac73..0f5036a03da 100644 --- a/gcc/testsuite/gfortran.dg/array_constructor_49.f90 +++ b/gcc/testsuite/gfortran.dg/array_constructor_49.f90 @@ -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" } } diff --git a/gcc/testsuite/gfortran.dg/graphite/pr38083.f90 b/gcc/testsuite/gfortran.dg/graphite/pr38083.f90 index da8c3cc7914..34d6ca83ad9 100644 --- a/gcc/testsuite/gfortran.dg/graphite/pr38083.f90 +++ b/gcc/testsuite/gfortran.dg/graphite/pr38083.f90 @@ -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 diff --git a/gcc/testsuite/gfortran.dg/integer_exponentiation_6.F90 b/gcc/testsuite/gfortran.dg/integer_exponentiation_6.F90 index 55c2543e705..4236ee61b65 100644 --- a/gcc/testsuite/gfortran.dg/integer_exponentiation_6.F90 +++ b/gcc/testsuite/gfortran.dg/integer_exponentiation_6.F90 @@ -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