summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr49698.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/pr49698.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/pr49698.f9015
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/pr49698.f90 b/gcc/testsuite/gfortran.dg/pr49698.f90
new file mode 100644
index 000000000..638cbb0b7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr49698.f90
@@ -0,0 +1,15 @@
+! PR fortran/49698
+! { dg-do compile }
+subroutine foo (x, y, z)
+ type S
+ integer, pointer :: e => null()
+ end type S
+ type T
+ type(S), dimension(:), allocatable :: a
+ end type T
+ type(T) :: x, y
+ integer :: z, i
+ forall (i = 1 : z)
+ y%a(i)%e => x%a(i)%e
+ end forall
+end subroutine foo