re PR fortran/52789 (gfortran sets -Wunused-parameter in the C sense as well as the...
authorDominique d'Humieres <dominiq@gcc.gnu.org>
Thu, 7 Feb 2019 17:40:29 +0000 (18:40 +0100)
committerDominique d'Humieres <dominiq@gcc.gnu.org>
Thu, 7 Feb 2019 17:40:29 +0000 (18:40 +0100)
2019-02-07  Dominique d'Humieres  <dominiq@gcc.gnu.org>

PR fortran/52789
* gfortran.dg/wunused-parameter_2.f90: New test.

From-SVN: r268656

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/wunused-parameter_2.f90 [new file with mode: 0644]

index e704b9093d6bb6a939eead78012f03ecf01061b7..5004a5e92526fcb750ccdb089d656b2ed034f140 100644 (file)
@@ -1,3 +1,8 @@
+2019-02-07  Dominique d'Humieres  <dominiq@gcc.gnu.org>
+
+       PR fortran/52789
+       * gfortran.dg/wunused-parameter_2.f90: New test.
+
 2019-02-07  Matthew Malcomson  <matthew.malcomson@arm.com>
 
        * gcc.dg/rtl/arm/ldrd-peepholes.c: Only run on arm
diff --git a/gcc/testsuite/gfortran.dg/wunused-parameter_2.f90 b/gcc/testsuite/gfortran.dg/wunused-parameter_2.f90
new file mode 100644 (file)
index 0000000..f627461
--- /dev/null
@@ -0,0 +1,13 @@
+! { dg-do compile }
+! { dg-options "-Wunused-parameter -Wunused-dummy-argument" }
+!
+! PR fortran/52789
+!
+! Contributed by Mat Cross
+!
+!  Check for unused parameter and dummy argument
+!
+
+subroutine s(x)             ! { dg-warning "Unused dummy argument" }
+integer, parameter :: i = 0 ! { dg-warning "Unused parameter" }
+end