summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/host_assoc_call_6.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/host_assoc_call_6.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/host_assoc_call_6.f9025
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/host_assoc_call_6.f90 b/gcc/testsuite/gfortran.dg/host_assoc_call_6.f90
new file mode 100644
index 000000000..60a5edc53
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/host_assoc_call_6.f90
@@ -0,0 +1,25 @@
+! { dg-do compile }
+!
+! PR fortran/38594, in which the symtree for the first
+! 'g' was being attached to the second. This is necessary
+! for generic interfaces(eg. hosts_call_3.f90) but makes
+! a mess otherwise.
+!
+! Contributed by Daniel Franke <dfranke@gcc.gnu.org>
+!
+MODULE m
+CONTAINS
+ SUBROUTINE g()
+ END SUBROUTINE
+ SUBROUTINE f()
+ CALL g()
+ CONTAINS
+ SUBROUTINE g()
+ END SUBROUTINE
+ END SUBROUTINE
+END MODULE
+
+ USE m
+ CALL g()
+END
+! { dg-final { cleanup-modules "m" } }