aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr86322_1.f90
blob: 48079ac7ecca5287590f49ad1174d2d00b7cb74e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
! { dg-do compile }
program foo
   implicit none
   type a
      integer i
   end type a
   type(a), target, save :: b
   type(a), pointer :: c
   data b%i /42/
   data c%i /b%i/          ! { dg-error "is not rightmost part-ref" }
   if (c%i == 42) c%i = 1  ! Unreachable
end program foo