aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/submodule_13.f0832
2 files changed, 37 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 546bc2e..805d794 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-11-30 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/68534
+ * gfortran.dg/submodule_13.f08: New test.
+
2015-11-30 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* gcc.target/s390/load-relative-check.c: Add scan patterns for
diff --git a/gcc/testsuite/gfortran.dg/submodule_13.f08 b/gcc/testsuite/gfortran.dg/submodule_13.f08
new file mode 100644
index 0000000..6a4d2ad
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/submodule_13.f08
@@ -0,0 +1,32 @@
+! { dg-do compile }
+!
+! Checks the fix for PR68534 in which checks for the number
+! failed if either the interface or the module procedure had
+! no dummies.
+!
+! Reported on clf at:
+! https://groups.google.com/forum/#!topic/comp.lang.fortran/-ZgbM5qkFmc
+!
+module m
+ implicit none
+ interface
+ module subroutine foo()
+ end subroutine foo
+
+ module subroutine bar(i)
+ integer, intent(inout) :: i
+ end subroutine bar
+ end interface
+end module m
+
+submodule(m) sm
+contains
+ module subroutine foo(i) ! { dg-error "Mismatch in number of MODULE PROCEDURE formal" }
+ integer, intent(inout) :: i
+ i = 42
+ end subroutine foo
+
+ module subroutine bar ! { dg-error "Mismatch in number of MODULE PROCEDURE formal" }
+ print *, "bar"
+ end subroutine bar
+end submodule sm