diff mbox

PR54224 Warn for unused internal procedures -- update testcase

Message ID 78ECA61A-7605-439D-B5F2-AF5B4941A95D@lps.ens.fr
State New
Headers show

Commit Message

Dominique d'Humières Nov. 5, 2015, 9:48 a.m. UTC
Is there any objection to commit the following (see comments 21 and 22)?

Dominique

Comments

Jerry DeLisle Nov. 6, 2015, 7:42 p.m. UTC | #1
On 11/05/2015 01:48 AM, Dominique d'Humières wrote:
> Is there any objection to commit the following (see comments 21 and 22)?
> 
> Dominique
> 

OK, simple.
diff mbox

Patch

Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog	(revision 229793)
+++ gcc/testsuite/ChangeLog	(working copy)
@@ -1,3 +1,9 @@ 
+2015-11-05  Dominique d'Humieres <dominiq@lps.ens.fr>
+
+	PR fortran/54224
+	* gfortran.dg/warn_unused_function_2.f90: Add two new 
+	"defined but not used" subroutines.
+
 2015-11-05  Richard Biener  <rguenther@suse.de>
 
 	* gcc.dg/tree-ssa/loadpre2.c: Avoid undefined behavior due to
Index: gcc/testsuite/gfortran.dg/warn_unused_function_2.f90
===================================================================
--- gcc/testsuite/gfortran.dg/warn_unused_function_2.f90	(revision 229793)
+++ gcc/testsuite/gfortran.dg/warn_unused_function_2.f90	(working copy)
@@ -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 @@ 
 
   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 @@ 
 entry en
 end subroutine
 
+program test
+contains
+  subroutine s5            ! { dg-warning "defined but not used" }
+  end subroutine
+end
 
 ! { dg-final { cleanup-modules "m" } }