This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Wierd test results for transfer_simplify_7.f90
- From: Daniel Franke <franke dot daniel at gmail dot com>
- To: fortran at gcc dot gnu dot org
- Cc: Dominique Dhumieres <dominiq at lps dot ens dot fr>
- Date: Sat, 22 Dec 2007 19:18:48 +0100
- Subject: Re: Wierd test results for transfer_simplify_7.f90
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date:user-agent:references:in-reply-to:cc:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; bh=GQVYE4KLY7XkSxVzV58MUfiZXj2yQ+bmMSJgpG4wzOw=; b=dDKsdMccqLfXSZu4QOYIqqH+6sozxtWNxT/tpWKJbiIO3h085BZ3L9Y8PV9WNNW0/DBi08D772Bkc0elEqcnwK8p1NsiW4OMFZ/EWyqCqSesMqQD35+QwfCNYrji/qhivRCHoStszfcpLBd2K/Mdj8YZYg2qa7L55P64q194e48=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:references:in-reply-to:cc:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=wbtpx3a2wdxDNPxkZnEYN3Khglw0eftL2qZoD8DBYacc88c+DX2K1lrOULQRKElHDCSABspBHqBaXnCAB9Ix4kzJuZvAJm/f9RkxVJgk1QmTNYE6muZJj/pbwN5WIsajZn4RVQeQFNai3u8eQjZ77y6i3NP714AfLhMYYvQwYhk=
- References: <20071222180826.88E325BB9E@mailhost.lps.ens.fr>
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