summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/der_pointer_2.f90
blob: 3749fc24ff83c44f0a14e93db493405efd30b860 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
! { dg-do compile }
! PR 15975, PR 16606
! Pointers to derived types with initialized components
!
! Contributed by Erik Edelmann <erik.edelmann@iki.fi>
!
SUBROUTINE N
  TYPE T
    INTEGER :: I = 99
  END TYPE T
  TYPE(T), POINTER :: P
  TYPE(T), TARGET  :: Q
  P => Q
  if (P%I.ne.99) call abort ()
END SUBROUTINE N

program test_pr15975
  call n ()
end program test_pr15975