coarray_41.f90: Add "-latomic" option if libatomic_available.
[official-gcc.git] / gcc / testsuite / gfortran.dg / array_constructor_21.f90
blob1b92c4ea1f6dd5509a2487216e769036d115bd4f
1 ! { dg-do compile }
3 ! PR fortran/34785, in which the character length of BA_T was not
4 ! passed on to the array constructor argument of SEQ.
6 ! Contributed by Dick Hendrickson <dick.hendrickson@gmail.com>
8 MODULE o_TYPE_DEFS
9 implicit none
10 TYPE SEQ
11 SEQUENCE
12 CHARACTER(len = 9) :: BA(2)
13 END TYPE SEQ
14 CHARACTER(len = 9) :: BA_T(2)
15 CHARACTER(LEN = 9) :: CA_T(1,2)
16 END MODULE o_TYPE_DEFS
18 MODULE TESTS
19 use o_type_defs
20 implicit none
21 CONTAINS
22 SUBROUTINE OG0015(UDS0L)
23 TYPE(SEQ) UDS0L
24 integer :: j1
25 UDS0L = SEQ((/ (BA_T(J1),J1=1,2) /))
26 END SUBROUTINE
27 END MODULE TESTS
29 use o_type_defs
30 CONTAINS
31 SUBROUTINE OG0015(UDS0L)
32 TYPE(SEQ) UDS0L
33 UDS0L = SEQ(RESHAPE ( (/ ((CA_T(J1,J2), J1 = 1, 1), J2 = 1, 2)/),(/2/)))
34 END SUBROUTINE
35 END