1! { dg-do run }
2! { dg-options "-std=legacy" }
3!
4! PR37707 Namelist read of array of derived type incorrect.
5type s
6   integer m
7   integer n
8end type s
9type(s) :: a(3)
10character*80 :: l = ' &namlis a%m=1,2, a%n=5,6, /'
11namelist /namlis/ a
12a%m=[87,88,89]
13a%n=[97,98,99]
14read(l,namlis)
15if (a(1)%m /= 1 .or. a(2)%m /= 2 .or. a(1)%n /= 5 .or. a(2)%n /= 6 .or. &
16  & a(3)%m /= 89 .or. a(3)%n /= 99) STOP 1
17end
18