aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pointer_assign_7.f90
blob: 5ec32e8d66eb0879ab4e2134fd5118ca2dfbcfed (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 "Pointer assignment to non-POINTER" }

end program