summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr32535.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/pr32535.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/pr32535.f9026
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/pr32535.f90 b/gcc/testsuite/gfortran.dg/pr32535.f90
new file mode 100644
index 000000000..43ea48e04
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr32535.f90
@@ -0,0 +1,26 @@
+! { dg-do compile }
+!
+! PR32535: namelist with private items contained in sub-sub-procedure of a module rejected
+!
+! Contributed by Janus Weil <jaydub66@gmail.com>
+
+module mo
+implicit none
+real, private:: a,b,c
+
+contains
+
+ subroutine sub
+ implicit none
+ namelist /nl1/ a,b,c
+
+ contains
+
+ subroutine subsub
+ implicit none
+ namelist /nl2/ a,b,c
+ end subroutine subsub
+ end subroutine sub
+end module mo
+
+! { dg-final { cleanup-modules "mo" } }