diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/host_assoc_call_1.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/host_assoc_call_1.f90 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/host_assoc_call_1.f90 b/gcc/testsuite/gfortran.dg/host_assoc_call_1.f90 new file mode 100644 index 000000000..804929080 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/host_assoc_call_1.f90 @@ -0,0 +1,17 @@ +! { dg-do compile } +! Tests the fix for PR31494, where the call of sub2 would reference +! the variable, rather than the contained subroutine. +! +! Contributed by Michael Richmond <michael.a.richmond@nasa.gov> +! +MODULE ksbin2_aux_mod +REAL, DIMENSION(1) :: sub2 +CONTAINS + SUBROUTINE sub1 + CALL sub2 + CONTAINS + SUBROUTINE sub2 + END SUBROUTINE sub2 + END SUBROUTINE sub1 +END MODULE ksbin2_aux_mod +! { dg-final { cleanup-modules "ksbin2_aux_mod" } } |