re PR fortran/78741 (ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1534)
[official-gcc.git] / gcc / testsuite / gfortran.dg / warnings_are_errors_1.f90
blob150f2346a4faf72347d76b1ce7b9b1717da556ce
1 ! { dg-do compile }
2 ! { dg-options "-Werror -Wunused -std=f95" }
3 ! PR fortran/21061
4 ! gfortran ignores -Werror
5 ! free-form tests
7 ! gfc_notify_std:
8 function char_ (ch) ! { dg-error "Obsolescent feature" }
9 character(*) :: char_, ch
10 char_ = ch
11 end function char_
13 ! warning(0,...):
14 ! function wrong_warn (i) ! { -warning "Function does not return a value" }
15 ! integer i
16 ! end function wrong_warn
18 implicit none
19 ! gfc_warning:
20 1234 complex :: cplx ! { dg-error "defined but cannot be used" }
21 cplx = 20.
23 end
24 ! { dg-final { output-exists-not } }
25 ! { dg-excess-errors "warnings being treated as errors" }