summaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-29 21:48:02 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-29 21:48:02 +0000
commit4a3e34f774a3748b5f9a7afd6d616adb26a15217 (patch)
tree885841ccc07182a6213729cc65527c492aa68529 /gcc/fortran
parentcc18a6982f1c80afada005eba9d3b5ff9697fa28 (diff)
downloadgcc-4a3e34f774a3748b5f9a7afd6d616adb26a15217.tar.gz
2013-10-29 Tobias Burnus <burnus@net-b.de>
PR fortran/44350 * parse.c (parse_spec): Add C1116 constraint check for BLOCK DATA. 2013-10-29 Tobias Burnus <burnus@net-b.de> PR fortran/44350 * gfortran.dg/blockdata_8.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204185 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/parse.c27
2 files changed, 33 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index d116183273a..059b7b3528c 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2013-10-29 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/44350
+ * parse.c (parse_spec): Add C1116 constraint
+ check for BLOCK DATA.
+
2013-10-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/58793
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c
index 512babfd450..e8b988558a8 100644
--- a/gcc/fortran/parse.c
+++ b/gcc/fortran/parse.c
@@ -2628,6 +2628,33 @@ loop:
default:
break;
}
+ else if (gfc_current_state () == COMP_BLOCK_DATA)
+ /* Fortran 2008, C1116. */
+ switch (st)
+ {
+ case ST_DATA_DECL:
+ case ST_COMMON:
+ case ST_DATA:
+ case ST_TYPE:
+ 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_USE:
+ break;
+
+ case ST_NONE:
+ break;
+
+ default:
+ gfc_error ("%s statement is not allowed inside of BLOCK DATA at %C",
+ gfc_ascii_statement (st));
+ reject_statement ();
+ break;
+ }
/* If we find a statement that can not be followed by an IMPLICIT statement
(and thus we can expect to see none any further), type the function result