summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/associate_39.f90
blob: 16357c32777aab06c9237b9dee8a1488df1f1938 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! { dg-do compile }
!
! PR 86935: Bad locus in ASSOCIATE statement
!
! Contributed by Janus Weil <janus@gcc.gnu.org>

implicit none

type :: t
  real :: r = 0.5
  integer :: i = 3
end type

type(t) :: x

associate (r => x%r, &
           i => x%ii)   ! { dg-error "Invalid association target" }

end