Commit a4ac5dd3 by Tobias Schlüter Committed by Tobias Schlüter

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
parent 0ca8e815
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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment