RISC-V: Regenerate opt urls.
[official-gcc.git] / gcc / testsuite / gfortran.dg / realloc_on_assign_32.f90
blob31a0d7677113d2f3724eb0de4582a58a7b990eff
1 ! { dg-do run }
3 ! Test the fix for PR88980 in which the 'span' field if the descriptor
4 ! for 'Items' was not set, causing the assignment to segfault.
6 ! Contributed by Antony Lewis <antony@cosmologist.info>
8 program tester
9 call gbug
10 contains
11 subroutine gbug
12 type TNameValue
13 character(LEN=:), allocatable :: Name
14 end type TNameValue
16 type TNameValue_pointer
17 Type(TNameValue), allocatable :: P
18 end type TNameValue_pointer
20 Type TType
21 type(TNameValue_pointer), dimension(:), allocatable :: Items
22 end type TType
23 Type(TType) T
25 allocate(T%Items(2))
26 allocate(T%Items(2)%P)
27 T%Items(2)%P%Name = 'test'
28 if (T%Items(2)%P%Name .ne. 'test') stop 1
30 end subroutine gbug
31 end program tester