From cce283c7fed0191170b94eedffe1c95472ca5c9e Mon Sep 17 00:00:00 2001 From: Toon Moene Date: Wed, 15 Feb 2006 22:06:58 +0100 Subject: [PATCH] re PR fortran/26054 (Gratuitous warning about Fortran 2003 features w/o -std=...) 2006-02-15 Toon Moene PR fortran/26054 * fortran/options.c: Do not warn for Fortran 2003 features by default. * testsuite/gfortran.dg/enum_8.f90: Remove check for warning. * testsuite/gfortran.dg/iomsg_1.f90: Ditto. * testsuite/gfortran.dg/enum_1.f90: Ditto. * testsuite/gfortran.dg/enum_9.f90: Ditto. * testsuite/gfortran.dg/enum_2.f90: Ditto. * testsuite/gfortran.dg/enum_10.f90: Ditto. * testsuite/gfortran.dg/enum_3.f90: Ditto. * testsuite/gfortran.dg/flush_1.f90: Ditto. * testsuite/gfortran.dg/enum_4.f90: Ditto. * testsuite/gfortran.dg/array_constructor_1.f90: Ditto. * testsuite/gfortran.dg/enum_5.f90: Ditto. * testsuite/gfortran.dg/enum_6.f90: Ditto. * testsuite/gfortran.dg/enum_7.f90: Ditto. From-SVN: r111117 --- gcc/fortran/ChangeLog | 5 +++++ gcc/fortran/options.c | 2 +- gcc/testsuite/ChangeLog | 17 +++++++++++++++++ .../gfortran.dg/array_constructor_1.f90 | 4 ++-- gcc/testsuite/gfortran.dg/enum_1.f90 | 2 +- gcc/testsuite/gfortran.dg/enum_10.f90 | 6 +++--- gcc/testsuite/gfortran.dg/enum_2.f90 | 2 +- gcc/testsuite/gfortran.dg/enum_3.f90 | 2 +- gcc/testsuite/gfortran.dg/enum_4.f90 | 4 ++-- gcc/testsuite/gfortran.dg/enum_5.f90 | 2 +- gcc/testsuite/gfortran.dg/enum_6.f90 | 2 +- gcc/testsuite/gfortran.dg/enum_7.f90 | 2 +- gcc/testsuite/gfortran.dg/enum_8.f90 | 4 ++-- gcc/testsuite/gfortran.dg/enum_9.f90 | 2 +- gcc/testsuite/gfortran.dg/flush_1.f90 | 8 ++++---- gcc/testsuite/gfortran.dg/iomsg_1.f90 | 8 ++++---- 16 files changed, 47 insertions(+), 25 deletions(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 013e7bab5f5..5a0b387df4c 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2006-02-15 Toon Moene + + PR fortran/26054 + * options.c: Do not warn for Fortran 2003 features by default. + 2006-02-15 Tobias Schlüter * check.c: Update copyright years. diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index bf1da85b8ba..6a9bec9b3a0 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -90,7 +90,7 @@ gfc_init_options (unsigned int argc ATTRIBUTE_UNUSED, | GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F77 | GFC_STD_GNU | GFC_STD_LEGACY; gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL - | GFC_STD_F2003 | GFC_STD_LEGACY; + | GFC_STD_LEGACY; gfc_option.warn_nonstd_intrinsics = 0; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d22edd340f2..21fcc953111 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,20 @@ +2006-02-15 Toon Moene + + PR fortran/26054 + * gfortran.dg/enum_8.f90: Remove check for warning. + * gfortran.dg/iomsg_1.f90: Ditto. + * gfortran.dg/enum_1.f90: Ditto. + * gfortran.dg/enum_9.f90: Ditto. + * gfortran.dg/enum_2.f90: Ditto. + * gfortran.dg/enum_10.f90: Ditto. + * gfortran.dg/enum_3.f90: Ditto. + * gfortran.dg/flush_1.f90: Ditto. + * gfortran.dg/enum_4.f90: Ditto. + * gfortran.dg/array_constructor_1.f90: Ditto. + * gfortran.dg/enum_5.f90: Ditto. + * gfortran.dg/enum_6.f90: Ditto. + * gfortran.dg/enum_7.f90: Ditto. + 2006-02-15 Jakub Jelinek PR middle-end/26300 diff --git a/gcc/testsuite/gfortran.dg/array_constructor_1.f90 b/gcc/testsuite/gfortran.dg/array_constructor_1.f90 index 20452f3d3fa..0ba8ba0d0a4 100644 --- a/gcc/testsuite/gfortran.dg/array_constructor_1.f90 +++ b/gcc/testsuite/gfortran.dg/array_constructor_1.f90 @@ -4,12 +4,12 @@ program bracket_array_constructor implicit none integer :: a(4), i - a = [ 1, 2, 3, 4 ] ! { dg-warning "array constructor" } + a = [ 1, 2, 3, 4 ] do i = 1, size(a) if (a(i) /= i) call abort() end do - a = [ (/ 1, 2, 3, 4 /) ] ! { dg-warning "array constructor" } + a = [ (/ 1, 2, 3, 4 /) ] do i = 1, size(a) if (a(i) /= i) call abort() end do diff --git a/gcc/testsuite/gfortran.dg/enum_1.f90 b/gcc/testsuite/gfortran.dg/enum_1.f90 index 1af5ab82f81..0156cb576f0 100644 --- a/gcc/testsuite/gfortran.dg/enum_1.f90 +++ b/gcc/testsuite/gfortran.dg/enum_1.f90 @@ -3,7 +3,7 @@ program main implicit none - enum, bind (c) ! { dg-warning "New in Fortran 2003" } + enum, bind (c) enumerator :: red, black enumerator blue end enum diff --git a/gcc/testsuite/gfortran.dg/enum_10.f90 b/gcc/testsuite/gfortran.dg/enum_10.f90 index c3fbe535c4f..dad29a1c512 100644 --- a/gcc/testsuite/gfortran.dg/enum_10.f90 +++ b/gcc/testsuite/gfortran.dg/enum_10.f90 @@ -5,15 +5,15 @@ ! corresponding C type. module enum_10 -enum, bind( c ) ! { dg-warning "New in Fortran 2003" } +enum, bind( c ) enumerator :: one1 = 1, two1, max1 = huge(1_1) end enum -enum, bind( c ) ! { dg-warning "New in Fortran 2003" } +enum, bind( c ) enumerator :: one2 = 1, two2, max2 = huge(1_2) end enum -enum, bind( c ) ! { dg-warning "New in Fortran 2003" } +enum, bind( c ) enumerator :: one4 = 1, two4, max4 = huge(1_4) end enum end module enum_10 diff --git a/gcc/testsuite/gfortran.dg/enum_2.f90 b/gcc/testsuite/gfortran.dg/enum_2.f90 index 1fd72474dd3..6d8a4b22b24 100644 --- a/gcc/testsuite/gfortran.dg/enum_2.f90 +++ b/gcc/testsuite/gfortran.dg/enum_2.f90 @@ -3,7 +3,7 @@ program main implicit none - enum, bind (c) ! { dg-warning "New in Fortran 2003" } + enum, bind (c) enumerator :: red, black integer :: x ! { dg-error "Unexpected data declaration" } enumerator blue = 1 ! { dg-error "Syntax error in ENUMERATOR definition" } diff --git a/gcc/testsuite/gfortran.dg/enum_3.f90 b/gcc/testsuite/gfortran.dg/enum_3.f90 index 3b01f93de31..277cabe9a80 100644 --- a/gcc/testsuite/gfortran.dg/enum_3.f90 +++ b/gcc/testsuite/gfortran.dg/enum_3.f90 @@ -3,7 +3,7 @@ program main implicit none - enum, bind (c) ! { dg-warning "New in Fortran 2003" } + enum, bind (c) enumerator :: red, black = 2.2 ! { dg-error "initialized with integer expression" } enumerator :: blue = "x" ! { dg-error "initialized with integer expression" } end enum ! { dg-error "has no ENUMERATORS" } diff --git a/gcc/testsuite/gfortran.dg/enum_4.f90 b/gcc/testsuite/gfortran.dg/enum_4.f90 index e3b13d7e73e..99acda0c818 100644 --- a/gcc/testsuite/gfortran.dg/enum_4.f90 +++ b/gcc/testsuite/gfortran.dg/enum_4.f90 @@ -3,12 +3,12 @@ program main implicit none - enum, bind (c) ! { dg-warning "New in Fortran 2003" } + enum, bind (c) enumerator :: red, black = 2 enumerator :: blue = 1, red ! { dg-error "already" } end enum - enum, bind (c) ! { dg-warning "New in Fortran 2003" } + enum, bind (c) enumerator :: r, b(10) = 2 ! { dg-error "cannot be array" } enumerator , save :: g = 1 ! { dg-error "cannot have attributes" } end ! { dg-error " END ENUM" } diff --git a/gcc/testsuite/gfortran.dg/enum_5.f90 b/gcc/testsuite/gfortran.dg/enum_5.f90 index 9ff2efa9c5a..604e50df44a 100644 --- a/gcc/testsuite/gfortran.dg/enum_5.f90 +++ b/gcc/testsuite/gfortran.dg/enum_5.f90 @@ -5,7 +5,7 @@ program main implicit none integer :: i = 1 - enum, bind (c) ! { dg-warning "New in Fortran 2003" } + enum, bind (c) enumerator :: red, black = i ! { dg-error "is a variable" } enumerator :: blue = 1 end enum junk ! { dg-error "Syntax error" } diff --git a/gcc/testsuite/gfortran.dg/enum_6.f90 b/gcc/testsuite/gfortran.dg/enum_6.f90 index 0396862684f..a0307275539 100644 --- a/gcc/testsuite/gfortran.dg/enum_6.f90 +++ b/gcc/testsuite/gfortran.dg/enum_6.f90 @@ -5,7 +5,7 @@ program main implicit none integer :: i = 1 - enum, bind (c) ! { dg-warning "New in Fortran 2003" } + enum, bind (c) enumerator :: sun, mon = 2 i = 2 ! { dg-error "Unexpected" } enumerator :: wed = 1 diff --git a/gcc/testsuite/gfortran.dg/enum_7.f90 b/gcc/testsuite/gfortran.dg/enum_7.f90 index d85e61d62f8..9971a51184e 100644 --- a/gcc/testsuite/gfortran.dg/enum_7.f90 +++ b/gcc/testsuite/gfortran.dg/enum_7.f90 @@ -4,7 +4,7 @@ program main implicit none - enum, bind (c) ! { dg-warning "New in Fortran 2003" } + enum, bind (c) enumerator :: sun, mon = 2 enum, bind (c) ! { dg-error "Unexpected" } enumerator :: apple, mango diff --git a/gcc/testsuite/gfortran.dg/enum_8.f90 b/gcc/testsuite/gfortran.dg/enum_8.f90 index 686b12880c4..cd3c12a27f7 100644 --- a/gcc/testsuite/gfortran.dg/enum_8.f90 +++ b/gcc/testsuite/gfortran.dg/enum_8.f90 @@ -4,11 +4,11 @@ program main implicit none - enum, bind (c) ! { dg-warning "New in Fortran 2003" } + enum, bind (c) enumerator :: pp , qq = 4294967295, rr ! { dg-error "not initialized with integer" } end enum ! { dg-error "has no ENUMERATORS" } - enum, bind (c) ! { dg-warning "New in Fortran 2003" } + enum, bind (c) enumerator :: p , q = 4294967299_8, r ! { dg-error "Arithmetic overflow" } end enum ! { dg-error "has no ENUMERATORS" } diff --git a/gcc/testsuite/gfortran.dg/enum_9.f90 b/gcc/testsuite/gfortran.dg/enum_9.f90 index 81c441aca2c..e735cf87772 100644 --- a/gcc/testsuite/gfortran.dg/enum_9.f90 +++ b/gcc/testsuite/gfortran.dg/enum_9.f90 @@ -4,7 +4,7 @@ program main implicit none - enum, bind (c) ! { dg-warning "New in Fortran 2003" } + enum, bind (c) enumerator :: red, black = 127 enumerator blue end enum diff --git a/gcc/testsuite/gfortran.dg/flush_1.f90 b/gcc/testsuite/gfortran.dg/flush_1.f90 index 51b7fa02f60..90875dc651b 100644 --- a/gcc/testsuite/gfortran.dg/flush_1.f90 +++ b/gcc/testsuite/gfortran.dg/flush_1.f90 @@ -8,17 +8,17 @@ program flush_1 open (unit=10, access='SEQUENTIAL', status='SCRATCH') write (10, *) 42 - flush 10 ! { dg-warning "Fortran 2003: FLUSH statement" } + flush 10 write (10, *) 42 - flush(10) ! { dg-warning "Fortran 2003: FLUSH statement" } + flush(10) write (10, *) 42 - flush(unit=10, iostat=ios) ! { dg-warning "Fortran 2003: FLUSH statement" } + flush(unit=10, iostat=ios) if (ios /= 0) call abort write (10, *) 42 - flush (unit=10, err=20) ! { dg-warning "Fortran 2003: FLUSH statement" } + flush (unit=10, err=20) goto 30 20 call abort 30 continue diff --git a/gcc/testsuite/gfortran.dg/iomsg_1.f90 b/gcc/testsuite/gfortran.dg/iomsg_1.f90 index 6a5819d043e..20c8e8b8962 100644 --- a/gcc/testsuite/gfortran.dg/iomsg_1.f90 +++ b/gcc/testsuite/gfortran.dg/iomsg_1.f90 @@ -5,24 +5,24 @@ program iomsg_test ! Test that iomsg is left unchanged with no error ch = 'asdf' - open(10, status='scratch', iomsg=ch, iostat=i) ! { dg-warning "Fortran 2003: IOMSG tag" } + open(10, status='scratch', iomsg=ch, iostat=i) if (ch .ne. 'asdf') call abort ! Test iomsg with data transfer statement - read(10,'(I2)', iomsg=ch, end=100) k ! { dg-warning "Fortran 2003: IOMSG tag" } + read(10,'(I2)', iomsg=ch, end=100) k call abort 100 continue if (ch .ne. 'End of file') call abort ! Test iomsg with open - open (-3, err=200, iomsg=ch) ! { dg-warning "Fortran 2003: IOMSG tag" } + open (-3, err=200, iomsg=ch) call abort 200 continue if (ch .ne. 'Bad unit number in OPEN statement') call abort ! Test iomsg with close - close(23,status="no_idea", err=500, iomsg=ch) ! { dg-warning "Fortran 2003: IOMSG tag" } + close(23,status="no_idea", err=500, iomsg=ch) 500 continue if (ch .ne. "Bad STATUS parameter in CLOSE statement") call abort end program iomsg_test -- 2.30.2