Debian Codegraph @

gcc/testsuite/gfortran.dg/pr16938.f90

raw
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) STOP 1
23 if (elementtable%data(2)%count /= 2) STOP 2
24 if (elementtable%data(1)%name /= "one ") STOP 3
25 if (elementtable%data(2)%name /= "two ") STOP 4
26 if (elementtable%l_size /= 2) STOP 5
27 end program Array_List