summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/warnings_are_errors_1.f90
blob: 150f2346a4faf72347d76b1ce7b9b1717da556ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
! { dg-do compile }
! { dg-options "-Werror -Wunused -std=f95" }
! PR fortran/21061
! gfortran ignores -Werror
! free-form tests

! gfc_notify_std:
       function char_ (ch) ! { dg-error "Obsolescent feature" }
       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-error "defined but cannot be used" }
      cplx = 20.

       end
! { dg-final { output-exists-not } }
! { dg-excess-errors "warnings being treated as errors" }