RISC-V: Refactor Dynamic LMUL codes
[official-gcc.git] / gcc / testsuite / gfortran.dg / associate_10.f90
blob53b055447b1fe7168ca3c61b3f573da347ea7dd1
1 ! { dg-do compile }
3 ! PR fortran/51383
5 ! Contributed by kaiserkarl31@yahoo.com
7 ! Was failing before at the ref resolution of y1(1)%i.
9 program extend
10 type :: a
11 integer :: i
12 end type a
13 type, extends (a) :: b
14 integer :: j
15 end type b
16 type (a) :: x(2)
17 type (b) :: y(2)
18 associate (x1 => x, y1 => y)
19 x1(1)%i = 1
20 ! Commenting out the following line will avoid the error
21 y1(1)%i = 2
22 end associate
23 end program extend