[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-fortran
Subject:    [Committed] PR fortran/77763 -- STRUCTURE in BLOCK DATA
From:       Steve Kargl <sgk () troutmask ! apl ! washington ! edu>
Date:       2016-10-23 21:30:04
Message-ID: 20161023213004.GA63387 () troutmask ! apl ! washington ! edu
[Download RAW message or body]

I've committed the following patch.  Both Oracle's manual
and DVF's manual indicate that STRUCTURE can appear in a
BLOCK DATA statement.  While I was here, I sorted the
case labels.

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

Index: gcc/fortran/parse.c
===================================================================
--- gcc/fortran/parse.c	(revision 241451)
+++ gcc/fortran/parse.c	(working copy)
@@ -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: gcc/testsuite/gfortran.dg/pr77763.f90
===================================================================
--- gcc/testsuite/gfortran.dg/pr77763.f90	(nonexistent)
+++ gcc/testsuite/gfortran.dg/pr77763.f90	(working copy)
@@ -0,0 +1,6 @@
+! { dg-do compile }
+! { dg-options "-fdec" }
+block data
+   structure /s1/
+   end structure
+end block data

-- 
Steve
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic