summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/class_array_18.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/class_array_18.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/class_array_18.f9016
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/class_array_18.f90 b/gcc/testsuite/gfortran.dg/class_array_18.f90
new file mode 100644
index 00000000000..5f2f3dee7f2
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_array_18.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+!
+! PR fortran/57535
+!
+program test
+ implicit none
+ type t
+ integer :: ii = 55
+ end type t
+contains
+ function func2()
+ class(t), allocatable :: func2(:)
+ allocate(func2(3))
+ func2%ii = [111,222,333]
+ end function func2
+end program test