Hi, I'd like to contribute this small test. I have legacy code which uses STRUCTURE statements in common blocks, and was happy to find Fritz's DEC support assumes ordering in STRUCTUREs, as the Oracle compiler does.

Jim MacArthur

--

2016-09-13  Jim MacArthur  <jim.macart...@codethink.co.uk>

       * gfortran.dg/dec_structure_14.f90: New testcase.

diff --git a/gcc/testsuite/gfortran.dg/dec_structure_14.f90 b/gcc/testsuite/gfortran.dg/dec_structure_14.f90
new file mode 100644
index 0000000..4e271b73
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dec_structure_14.f90
@@ -0,0 +1,18 @@
+  ! { dg-do "compile" }
+  ! { dg-options "-fdec-structure" }
+  !
+  ! Test that structures inside a common block do not require the
+  ! SEQUENCE attribute, as derived types do.
+  !
+
+common var
+
+structure /s/
+  integer i
+  integer j
+  real r
+end structure
+
+record /s/ var
+
+end
--

Reply via email to