aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/symbol.c
diff options
context:
space:
mode:
authorSteven G. Kargl <kargl@gcc.gnu.org>2012-01-21 17:32:12 +0000
committerSteven G. Kargl <kargl@gcc.gnu.org>2012-01-21 17:32:12 +0000
commitbb3a6981bf23bebe7a602a5416ee7f52afed9052 (patch)
tree991b80e5b545a3f5ce82adbc0a4a7f549d20e409 /gcc/fortran/symbol.c
parent076ec830bf9d00dfa216beb88fb7d58650fbfbc1 (diff)
downloadgcc-bb3a6981bf23bebe7a602a5416ee7f52afed9052.zip
gcc-bb3a6981bf23bebe7a602a5416ee7f52afed9052.tar.gz
gcc-bb3a6981bf23bebe7a602a5416ee7f52afed9052.tar.bz2
[multiple changes]
2012-01-21 Tobias Burnus <burnus@net-b.de> Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/50556 * symbol.c (check_conflict): namelist-group-name cannot have the SAVE attribure. 2012-01-21 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/50556 * gfortran.dg/namelist_74.f90: New test. * gfortran.dg/namelist_59.f90: Remove SAVE attribute. From-SVN: r183370
Diffstat (limited to 'gcc/fortran/symbol.c')
-rw-r--r--gcc/fortran/symbol.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index fcc1ccf..36fc1ed 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -444,12 +444,15 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where)
a1 = gfc_code2string (flavors, attr->flavor);
a2 = save;
goto conflict;
-
+ case FL_NAMELIST:
+ gfc_error ("Namelist group name at %L cannot have the "
+ "SAVE attribute", where);
+ return FAILURE;
+ break;
case FL_PROCEDURE:
/* Conflicts between SAVE and PROCEDURE will be checked at
resolution stage, see "resolve_fl_procedure". */
case FL_VARIABLE:
- case FL_NAMELIST:
default:
break;
}