aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/warn_unused_function_2.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/warn_unused_function_2.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/warn_unused_function_2.f909
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/warn_unused_function_2.f90 b/gcc/testsuite/gfortran.dg/warn_unused_function_2.f90
index 8d65dabef89..958cc969253 100644
--- a/gcc/testsuite/gfortran.dg/warn_unused_function_2.f90
+++ b/gcc/testsuite/gfortran.dg/warn_unused_function_2.f90
@@ -2,6 +2,7 @@
! { dg-options "-Wall" }
!
! [4.8 Regression] PR 54997: -Wunused-function gives false warnings
+! PR 54224: missing warnings with -Wunused-function
!
! Contributed by Janus Weil <janus@gcc.gnu.org>
@@ -14,6 +15,9 @@ contains
subroutine s1 ! { dg-warning "defined but not used" }
call s2(s3)
+ contains
+ subroutine s4 ! { dg-warning "defined but not used" }
+ end subroutine
end subroutine
subroutine s2(dummy) ! { dg-warning "Unused dummy argument" }
@@ -30,5 +34,10 @@ subroutine sub
entry en
end subroutine
+program test
+contains
+ subroutine s5 ! { dg-warning "defined but not used" }
+ end subroutine
+end
! { dg-final { cleanup-modules "m" } }