1! { dg-do run } 2! { dg-options "-fdec-structure" } 3! 4! Test nested STRUCTURE definitions. 5! 6 7subroutine aborts (s) 8 character(*), intent(in) :: s 9 print *, s 10 STOP 1 11end subroutine 12 13structure /s3/ 14 real p 15 structure /s4/ recrd, recrd_a(3) 16 integer i, j 17 end structure 18 real q 19end structure 20 21record /s3/ r3 22record /s4/ r4 23 24r3.p = 1.3579 25r4.i = 0 26r4.j = 1 27r3.recrd = r4 28r3.recrd_a(1) = r3.recrd 29r3.recrd_a(2).i = 1 30r3.recrd_a(2).j = 0 31 32if (r3.p .ne. 1.3579) then 33 call aborts("r3.p") 34endif 35 36if (r4.i .ne. 0) then 37 call aborts("r4.i") 38endif 39 40if (r4.j .ne. 1) then 41 call aborts("r4.j") 42endif 43 44if (r3.recrd.i .ne. 0 .or. r3.recrd.j .ne. 1) then 45 call aborts("r3.recrd") 46endif 47 48if (r3.recrd_a(2).i .ne. 1 .or. r3.recrd_a(2).j .ne. 0) then 49 call aborts("r3.recrd_a(2)") 50endif 51 52end 53