1! { dg-do run } 2! { dg-options "-fdec-structure" } 3! 4! Basic STRUCTURE test. 5! 6 7subroutine aborts (s) 8 character(*), intent(in) :: s 9 print *, s 10 STOP 1 11end subroutine 12 13! Basic structure 14structure /s1/ ! type s1 15 integer i1 16 logical l1 17 real r1 18 character c1 19end structure ! end type s1 20 21record /s1/ r1 ! type (s1) r1 22record /s1/ r1_a(3) ! type (s1) r1_a(3) 23 24! Basic records 25r1.i1 = 13579 ! r1%i1 = ... 26r1.l1 = .true. 27r1.r1 = 13.579 28r1.c1 = 'F' 29r1_a(2) = r1 30r1_a(3).r1 = 135.79 31 32if (r1.i1 .ne. 13579) then 33 call aborts("r1.i1") 34endif 35 36if (r1.l1 .neqv. .true.) then 37 call aborts("r1.l1") 38endif 39 40if (r1.r1 .ne. 13.579) then 41 call aborts("r1.r1") 42endif 43 44if (r1.c1 .ne. 'F') then 45 call aborts("r1.c1") 46endif 47 48if (r1_a(2).i1 .ne. 13579) then 49 call aborts("r1_a(2).i1") 50endif 51 52if (r1_a(3).r1 .ne. 135.79) then 53 call aborts("r1_a(3).r1") 54endif 55 56end 57