aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/associate_52.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/associate_52.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/associate_52.f9024
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/associate_52.f90 b/gcc/testsuite/gfortran.dg/associate_52.f90
new file mode 100644
index 0000000..c24ec4b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/associate_52.f90
@@ -0,0 +1,24 @@
+! { dg-do compile }
+!
+! PR fortran/93427
+!
+! Contributed by Andrew Benson
+!
+module a
+
+type :: t
+end type t
+
+contains
+
+recursive function b()
+ class(t), pointer :: b
+ type(t) :: c
+ allocate(t :: b)
+ select type (b)
+ type is (t)
+ b=c
+ end select
+end function b
+
+end module a