view gcc/testsuite/gfortran.dg/lto/pr45586_0.f90 @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 04ced10e8804
children
line wrap: on
line source

! { dg-lto-do link }
      MODULE M1
      INTEGER, PARAMETER :: dp=8
      TYPE realspace_grid_type

          REAL(KIND=dp), DIMENSION ( :, :, : ), ALLOCATABLE :: r

      END TYPE realspace_grid_type
      END MODULE

      MODULE M2
      USE m1
      CONTAINS
      SUBROUTINE S1(x)
      TYPE(realspace_grid_type), POINTER :: x
      REAL(dp), DIMENSION(:, :, :), POINTER    :: y
      y=>x%r
      y=0

      END SUBROUTINE
      END MODULE

      USE M2
      TYPE(realspace_grid_type), POINTER :: x
      ALLOCATE(x)
      ALLOCATE(x%r(10,10,10))
      CALL S1(x)
      write(6,*) x%r
      END