nvptx, libgfortran: Switch out of "minimal" mode
[official-gcc.git] / gcc / testsuite / gfortran.dg / dec_structure_1.f90
blob27c8f051b58ad19ee08bc8df26ce6a6b3b62be65
1 ! { dg-do run }
2 ! { dg-options "-fdec-structure" }
4 ! Basic STRUCTURE test.
7 subroutine aborts (s)
8 character(*), intent(in) :: s
9 print *, s
10 STOP 1
11 end subroutine
13 ! Basic structure
14 structure /s1/ ! type s1
15 integer i1
16 logical l1
17 real r1
18 character c1
19 end structure ! end type s1
21 record /s1/ r1 ! type (s1) r1
22 record /s1/ r1_a(3) ! type (s1) r1_a(3)
24 ! Basic records
25 r1.i1 = 13579 ! r1%i1 = ...
26 r1.l1 = .true.
27 r1.r1 = 13.579
28 r1.c1 = 'F'
29 r1_a(2) = r1
30 r1_a(3).r1 = 135.79
32 if (r1.i1 .ne. 13579) then
33 call aborts("r1.i1")
34 endif
36 if (r1.l1 .neqv. .true.) then
37 call aborts("r1.l1")
38 endif
40 if (r1.r1 .ne. 13.579) then
41 call aborts("r1.r1")
42 endif
44 if (r1.c1 .ne. 'F') then
45 call aborts("r1.c1")
46 endif
48 if (r1_a(2).i1 .ne. 13579) then
49 call aborts("r1_a(2).i1")
50 endif
52 if (r1_a(3).r1 .ne. 135.79) then
53 call aborts("r1_a(3).r1")
54 endif
56 end