aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr80668.f90
blob: 63bd0d3d5cd5b8226212eaf341408abc2402877f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
! { dg-do compile }
! { dg-options "-finit-derived -finit-integer=12345678" }
!
! PR fortran/80668
!
! Test a regression where structure constructor expressions were created for
! POINTER components with -finit-derived.
!

MODULE pr80668
  IMPLICIT NONE
  TYPE :: dist_t
     INTEGER :: TYPE,nblks_loc,nblks
     INTEGER,DIMENSION(:),POINTER :: dist
  END TYPE dist_t

CONTAINS

  SUBROUTINE hfx_new()
    TYPE(dist_t)                             :: dist
    integer,pointer :: bob
    CALL release_dist(dist, bob)
  END SUBROUTINE hfx_new

  SUBROUTINE release_dist(dist,p)
    TYPE(dist_t)                             :: dist
    integer, pointer, intent(in) :: p
  END SUBROUTINE release_dist
END MODULE