PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / warnings_are_errors_1.f
blob9c3d8ae01b775b86ea63e285c7a82d8891e2fa2a
1 ! { dg-do compile }
2 ! { dg-options " -Werror" }
3 ! { dg-message "warnings being treated as errors" "" { target *-*-* } 0 }
4 ! PR fortran/21061
5 ! gfortran ignores -Werror
6 ! fixed-form tests
7 program warnings_are_errors_1
8 implicit none
9 integer(kind=1) :: i
10 real :: r1, r2(3)
11 ! gfc_warning_now:
12 0 r1 = 0 ! { dg-error "Zero is not a valid statement label" }
14 34 5 i=0
15 ! gfc_notify_std(GFC_STD_F95_DEL):
16 do r1 = 1, 2 ! { dg-error "Deleted feature: Loop variable" }
17 i = i+1
18 end do
19 call foo j bar
20 ! gfc_warning:
21 r2(4) = 0 ! { dg-error "is out of bounds" }
23 goto 3 45
24 end
25 ! { dg-final { output-exists-not } }