diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/pointer_intent_6.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/pointer_intent_6.f90 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/pointer_intent_6.f90 b/gcc/testsuite/gfortran.dg/pointer_intent_6.f90 new file mode 100644 index 000000000..56c7de5eb --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pointer_intent_6.f90 @@ -0,0 +1,19 @@ +! { dg-do compile } +! +! PR fortran/52864 +! +! Assigning to an intent(in) pointer (which is valid). +! + program test + type PoisFFT_Solver3D + complex, dimension(:,:,:), & + pointer :: work => null() + end type PoisFFT_Solver3D + contains + subroutine PoisFFT_Solver3D_FullPeriodic(D, p) + type(PoisFFT_Solver3D), intent(in) :: D + real, intent(in), pointer :: p(:) + D%work(i,j,k) = 0.0 + p = 0.0 + end subroutine + end |