summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pointer_assign_7.f90
blob: c85dc72c8ff65fa630668608bf655ca644485838 (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
! { dg-do compile }
!
! PR 39931: ICE on invalid Fortran 95 code (bad pointer assignment)
!
! Contributed by Thomas Orgis <thomas.orgis@awi.de>

program point_of_no_return

implicit none

type face_t
  integer :: bla
end type

integer, pointer :: blu
type(face_t), pointer :: face

allocate(face)
allocate(blu)

face%bla => blu  ! { dg-error "Non-POINTER in pointer association context" }

end program