summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/dec_structure_18.f90
blob: 1e6b229216bf8edc04e520dcf456862a4cd65649 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
      ! { dg-do run }
      ! { dg-options "-fdec-structure -ffixed-form" }
      !
      ! Test the %FILL component extension.
      !
      implicit none

      structure /s/
        character(2) i
        character(2) %fill
        character(2) j
      end structure

      structure /s2/
        character buf(6)
      end structure

      record /s/ x
      record /s2/ y
      equivalence (x, y)

      x.i = '12'
      x.j = '34'

      if (y.buf(1) .ne. '1') then
        call abort
      endif
      if (y.buf(2) .ne. '2') then
        call abort
      endif
      if (y.buf(5) .ne. '3') then
        call abort
      endif
      if (y.buf(6) .ne. '4') then
        call abort
      endif

      end