diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/private_type_13.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/private_type_13.f90 | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/private_type_13.f90 b/gcc/testsuite/gfortran.dg/private_type_13.f90 new file mode 100644 index 00000000000..77c41a44f12 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/private_type_13.f90 @@ -0,0 +1,32 @@ +! { dg-do compile } +! Test fix for F95 part of PR39800, in which the host association of the type 't1' +! generated an error. +! +! Reported to clf by Alexei Matveev <Alexei Matveev@gmail.com> and reported by +! Tobias Burnus <burnus@gcc.gnu.org> +! +module m + implicit none + private + + type :: t1 + integer :: i + end type + + type :: t2 + type(t1) :: j + end type + + contains + + subroutine sub() + implicit none + + type :: t3 + type(t1) :: j + end type + + end subroutine + +end module +! { dg-final { cleanup-modules "m" } } |