re PR fortran/13201 (PARAMETER variables of nonconstant shape are accepted)

PR fortran/13201
* resolve.c (resolve_symbol): Verify that parameter array has an
explicit shape. Fix typos and coding style issues in surrounding
lines.

From-SVN: r82830
This commit is contained in:
Tobias Schlüter 2004-06-09 14:35:39 +02:00 committed by Tobias Schlüter
parent 0ca8e815a5
commit a4ac5dd3ef
2 changed files with 20 additions and 5 deletions

View File

@ -1,4 +1,11 @@
2004-06-05 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/13201
* resolve.c (resolve_symbol): Verify that parameter array has an
explicit shape. Fix typos and coding style issues in surrounding
lines.
2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/15478
* gfortran.texi: The documentation doesn't contain infomration on

View File

@ -3736,14 +3736,22 @@ resolve_symbol (gfc_symbol * sym)
|| sym->as->type == AS_ASSUMED_SHAPE)
&& sym->attr.dummy == 0)
{
gfc_error("Assumed %s array at %L must be a dummy argument",
sym->as->type == AS_ASSUMED_SIZE ? "size" : "shape",
&sym->declared_at);
gfc_error ("Assumed %s array at %L must be a dummy argument",
sym->as->type == AS_ASSUMED_SIZE ? "size" : "shape",
&sym->declared_at);
return;
}
if (sym->attr.flavor == FL_PARAMETER
&& sym->as != NULL && sym->as->type != AS_EXPLICIT)
{
gfc_error ("Parameter array '%s' at %L must have an explicit shape",
sym->name, &sym->declared_at);
return;
}
/* Make sure that character string variables with assumed length are
dummy argument. */
dummy arguments. */
if (sym->attr.flavor == FL_VARIABLE && !sym->attr.result
&& sym->ts.type == BT_CHARACTER