RISC-V: Regenerate opt urls.
[official-gcc.git] / gcc / testsuite / gfortran.dg / alloc_comp_assign_9.f90
blob0d0a2bf2874e9ff72bab418ec1641e1ef801160d
1 ! { dg-do run }
2 ! Test the fix for PR39519, where the presence of the pointer
3 ! as the first component was preventing the second from passing
4 ! the "alloc_comp" attribute to the derived type.
6 ! Contributed by Gilbert Scott <gilbert.scott@easynet.co.uk>
8 PROGRAM X
9 TYPE T
10 INTEGER, POINTER :: P
11 INTEGER, ALLOCATABLE :: A(:)
12 END TYPE T
13 TYPE(T) :: T1,T2
14 ALLOCATE ( T1%A(1) )
15 ALLOCATE ( T2%A(1) )
16 T1%A = 23
17 T2 = T1
18 T1%A = 42
19 if (T2%A(1) .NE. 23) STOP 1
20 END PROGRAM X