diff options
author | Bernhard Fischer <aldot@gcc.gnu.org> | 2007-04-14 20:33:11 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <aldot@gcc.gnu.org> | 2007-04-14 20:33:11 +0200 |
commit | b9cc7c96e5b98adcdf405b946d3fc3089e80a5a0 (patch) | |
tree | 4b39bc396ae9cc36c342463e3b042c50bd84f6b5 | |
parent | 06e2b6a0e3b6d4fb6d62bd5278febaf52eccf771 (diff) | |
download | gcc-b9cc7c96e5b98adcdf405b946d3fc3089e80a5a0.zip gcc-b9cc7c96e5b98adcdf405b946d3fc3089e80a5a0.tar.gz gcc-b9cc7c96e5b98adcdf405b946d3fc3089e80a5a0.tar.bz2 |
2007-04-14 Bernhard Fischer
PR fortran/21061
* gfortran.dg/warnings_are_errors_1.f90: New testcase.
* gfortran.dg/warnings_are_errors_1.f: New testcase.
From-SVN: r123820
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/warnings_are_errors_1.f | 24 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/warnings_are_errors_1.f90 | 26 |
3 files changed, 56 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 96168d1..29ee918 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2007-04-14 Bernhard Fischer <aldot@gcc.gnu.org> + + PR fortran/21061 + * gfortran.dg/warnings_are_errors_1.f90: New testcase. + * gfortran.dg/warnings_are_errors_1.f: New testcase. + 2007-04-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR fortran/31561 diff --git a/gcc/testsuite/gfortran.dg/warnings_are_errors_1.f b/gcc/testsuite/gfortran.dg/warnings_are_errors_1.f new file mode 100644 index 0000000..26c4e26 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/warnings_are_errors_1.f @@ -0,0 +1,24 @@ +! { dg-do compile } +! { dg-options " -Werror" } +! PR fortran/21061 +! gfortran ignores -Werror +! fixed-form tests + program warnings_are_errors_1 + implicit none + integer(kind=1) :: i + real :: r1, r2(3) +! gfc_warning_now: +0 ! { dg-warning "Zero is not a valid statement label" } +! +34 5 i=0 +! gfc_notify_std(GFC_STD_F95_DEL): + do r1 = 1.0, 2 ! { dg-warning "Obsolete: REAL DO loop iterator" } + i = i+1 + end do + call foo j bar +! gfc_warning: + r2(4) = 0 ! { dg-warning "is out of bounds" } + + goto 3 45 + end +! { dg-final { output-exists-not } } diff --git a/gcc/testsuite/gfortran.dg/warnings_are_errors_1.f90 b/gcc/testsuite/gfortran.dg/warnings_are_errors_1.f90 new file mode 100644 index 0000000..f141033 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/warnings_are_errors_1.f90 @@ -0,0 +1,26 @@ +! { dg-do compile } +! { dg-options "-Werror -Wunused" } +! PR fortran/21061 +! gfortran ignores -Werror +! free-form tests + +! gfc_notify_std: + function char_ (ch) ! { dg-warning "is obsolescent in fortran 95" } + character(*) :: char_, ch + char_ = ch + end function char_ + +! warning(0,...): +! function wrong_warn (i) ! { -warning "Function does not return a value" } +! integer i +! end function wrong_warn + + implicit none +! gfc_warning: +1234 complex :: cplx ! { dg-warning "defined but cannot be used" } + cplx = 20. + +! gfc_warning_now: + 1 ! { dg-warning "Ignoring statement label in empty statement" } + end +! { dg-final { output-exists-not } } |