diff options
author | Toon Moene <toon@moene.indiv.nluug.nl> | 2006-02-15 22:06:58 +0100 |
---|---|---|
committer | Toon Moene <toon@gcc.gnu.org> | 2006-02-15 21:06:58 +0000 |
commit | cce283c7fed0191170b94eedffe1c95472ca5c9e (patch) | |
tree | 67fa65ef38317cfebaf3751035971e43f3d5f10d /gcc | |
parent | 01ea23f3d250c13a0097cd22e6d36390941c4c97 (diff) | |
download | gcc-cce283c7fed0191170b94eedffe1c95472ca5c9e.zip gcc-cce283c7fed0191170b94eedffe1c95472ca5c9e.tar.gz gcc-cce283c7fed0191170b94eedffe1c95472ca5c9e.tar.bz2 |
re PR fortran/26054 (Gratuitous warning about Fortran 2003 features w/o -std=...)
2006-02-15 Toon Moene <toon@moene.indiv.nluug.nl>
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/options.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 17 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/array_constructor_1.f90 | 4 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/enum_1.f90 | 2 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/enum_10.f90 | 6 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/enum_2.f90 | 2 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/enum_3.f90 | 2 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/enum_4.f90 | 4 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/enum_5.f90 | 2 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/enum_6.f90 | 2 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/enum_7.f90 | 2 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/enum_8.f90 | 4 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/enum_9.f90 | 2 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/flush_1.f90 | 8 | ||||
-rw-r--r-- | 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 013e7ba..5a0b387 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2006-02-15 Toon Moene <toon@moene.indiv.nluug.nl> + + PR fortran/26054 + * options.c: Do not warn for Fortran 2003 features by default. + 2006-02-15 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de> * check.c: Update copyright years. diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index bf1da85..6a9bec9 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 d22edd3..21fcc95 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,20 @@ +2006-02-15 Toon Moene <toon@moene.indiv.nluug.nl> + + 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 <jakub@redhat.com> 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 20452f3..0ba8ba0 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 1af5ab8..0156cb5 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 c3fbe53..dad29a1 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 1fd7247..6d8a4b2 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 3b01f93..277cabe 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 e3b13d7..99acda0 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 9ff2efa..604e50d 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 0396862..a030727 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 d85e61d..9971a51 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 686b128..cd3c12a 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 81c441a..e735cf8 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 51b7fa0..90875dc 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 6a5819d..20c8e8b 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 |