1! { dg-do run }
2! We used to get an internal error in the backend when trying to compile this
3! Added some code which verifies that we're actually doing the right thing.
4  program Array_List
5    implicit none
6
7    type :: Compound
8      integer                       :: Count
9      character (len = 4)           :: Name
10    end type Compound
11
12    type :: Table
13      type (Compound)               :: Data (2)
14      integer :: L_Size
15    end type Table
16
17    type (Table) :: ElementTable
18    ElementTable%Data(1) = Compound(1,"one")
19    ElementTable%Data(2) = Compound(2,"two")
20    ElementTable%L_size  = 2
21
22    if (elementtable%data(1)%count /= 1) call abort
23    if (elementtable%data(2)%count /= 2) call abort
24    if (elementtable%data(1)%name /= "one ") call abort
25    if (elementtable%data(2)%name /= "two ") call abort
26    if (elementtable%l_size /= 2) call abort
27  end program Array_List
28