summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pointer_intent_6.f90
blob: 56c7de5ebba47abf1d795e674303bc6ad1b2483a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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