Wierd test results for transfer_simplify_7.f90
Daniel Franke
franke.daniel@gmail.com
Sat Dec 22 18:19:00 GMT 2007
On Saturday 22 December 2007 19:08:26 Dominique Dhumieres wrote:
> Error: Parameter 'cp' at (1) has not been declared or is a variable, which
> does not reduce to a constant expression
>
> Any idea of what could be wrong with ppc?
I'd hazard a guess that either the patch you applied or svn update was
incomplete. Do you have the changes below in expr.c?
--- expr.c (revision 131020)
+++ expr.c (working copy)
@@ -2202,7 +2202,18 @@ check_init_expr (gfc_expr *e)
if (e->symtree->n.sym->attr.flavor == FL_PARAMETER)
{
- t = simplify_parameter_variable (e, 0);
+ /* A PARAMETER shall not be used to define itself, i.e.
+ REAL, PARAMETER :: x = transfer(0, x)
+ is invalid. */
+ if (!e->symtree->n.sym->value)
+ {
+ gfc_error("PARAMETER '%s' is used at %L before its definition "
+ "is complete", e->symtree->n.sym->name, &e->where);
+ t = FAILURE;
+ }
+ else
+ t = simplify_parameter_variable (e, 0);
+
break;
}
Regards
Daniel
More information about the Fortran
mailing list