aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/dec_structure_18.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/dec_structure_18.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/dec_structure_18.f9038
1 files changed, 38 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/dec_structure_18.f90 b/gcc/testsuite/gfortran.dg/dec_structure_18.f90
new file mode 100644
index 00000000000..1e6b229216b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dec_structure_18.f90
@@ -0,0 +1,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