re PR fortran/77763 (ICE in parse_struct_map, at fortran/parse.c:3064)
authorSteven G. Kargl <kargl@gcc.gnu.org>
Sun, 23 Oct 2016 21:26:44 +0000 (21:26 +0000)
committerSteven G. Kargl <kargl@gcc.gnu.org>
Sun, 23 Oct 2016 21:26:44 +0000 (21:26 +0000)
2016-10-23  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/77763
* parse.c (parse_spec): Allow STRUCTURE in BLOCK DATA.  Sort
case labels.

2016-10-23  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/77763
* gfortran.dg/pr77763.f90

From-SVN: r241454

gcc/fortran/ChangeLog
gcc/fortran/parse.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr77763.f90 [new file with mode: 0644]

index 0931104b740247f0a1ad707e4f1a83f2f1fbf35c..ef49d6f09efb6453dda71761c31dd86661a644ed 100644 (file)
@@ -1,3 +1,9 @@
+2016-10-23  Steven G. Kargl  <kargl@gcc.gnu.org>
+
+       PR fortran/77763
+       * parse.c (parse_spec): Allow STRUCTURE in BLOCK DATA.  Sort
+       case labels.
+
 2016-10-23  Steven G. Kargl  <kargl@gcc.gnu.org>
 
        PR fortran/54730
index 73cb0dbdaf965e888eb4cac750f691a6fa9e50d5..03234358547b8e56990c2d32fbcc6560c58549fc 100644 (file)
@@ -3588,17 +3588,18 @@ loop:
     /* Fortran 2008, C1116.  */
     switch (st)
       {
-        case ST_DATA_DECL:
+       case ST_ATTR_DECL:
        case ST_COMMON:
        case ST_DATA:
-       case ST_TYPE:
+       case ST_DATA_DECL:
+       case ST_DERIVED_DECL:
        case ST_END_BLOCK_DATA:
-       case ST_ATTR_DECL:
        case ST_EQUIVALENCE:
-       case ST_PARAMETER:
        case ST_IMPLICIT:
        case ST_IMPLICIT_NONE:
-       case ST_DERIVED_DECL:
+       case ST_PARAMETER:
+       case ST_STRUCTURE_DECL:
+       case ST_TYPE:
        case ST_USE:
          break;
 
index 6d2c80f372bae668da6cfa3f8eee7d2b2f7451d0..35da701d7ea6501c9707499f6357adf6c98ef88f 100644 (file)
@@ -1,3 +1,8 @@
+2016-10-23  Steven G. Kargl  <kargl@gcc.gnu.org>
+
+       PR fortran/77763
+       * gfortran.dg/pr77763.f90
+
 2016-10-23  Steven G. Kargl  <kargl@gcc.gnu.org>
 
        PR fortran/54730
diff --git a/gcc/testsuite/gfortran.dg/pr77763.f90 b/gcc/testsuite/gfortran.dg/pr77763.f90
new file mode 100644 (file)
index 0000000..b48dc98
--- /dev/null
@@ -0,0 +1,6 @@
+! { dg-do compile }
+! { dg-options "-fdec" }
+block data
+   structure /s1/
+   end structure
+end block data