1! { dg-do run } 2! { dg-options "-fdec-structure" } 3! 4! Test UNIONs with array components. 5! 6 7subroutine aborts (s) 8 character(*), intent(in) :: s 9 print *, s 10 STOP 1 11end subroutine 12 13! Unions with arrays 14structure /s5/ 15 union 16 map 17 character :: s(5) 18 end map 19 map 20 integer(1) :: a(5) 21 end map 22 end union 23end structure 24 25record /s5/ r5 26 27! Unions with arrays 28r5.a(1) = z'41' 29r5.a(2) = z'42' 30r5.a(3) = z'43' 31r5.a(4) = z'44' 32r5.a(5) = z'45' 33if ( r5.s(1) .ne. 'A' & 34 .or. r5.s(2) .ne. 'B' & 35 .or. r5.s(3) .ne. 'C' & 36 .or. r5.s(4) .ne. 'D' & 37 .or. r5.s(5) .ne. 'E') then 38 call aborts ("arrays") 39endif 40 41end 42