| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-Werror -Wunused -std=f95" } |
| 3 |
! PR fortran/21061 |
| 4 |
! gfortran ignores -Werror |
| 5 |
! free-form tests |
| 6 |
|
| 7 |
! gfc_notify_std: |
| 8 |
function char_ (ch) ! { dg-error "Obsolescent feature" } |
| 9 |
character(*) :: char_, ch |
| 10 |
char_ = ch |
| 11 |
end function char_ |
| 12 |
|
| 13 |
! warning(0,...): |
| 14 |
! function wrong_warn (i) ! { -warning "Function does not return a value" } |
| 15 |
! integer i |
| 16 |
! end function wrong_warn |
| 17 |
|
| 18 |
implicit none |
| 19 |
! gfc_warning: |
| 20 |
1234 complex :: cplx ! { dg-error "defined but cannot be used" } |
| 21 |
cplx = 20. |
| 22 |
|
| 23 |
end |
| 24 |
! { dg-final { output-exists-not } } |
| 25 |
! { dg-prune-output "warnings being treated as errors" } |