This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [fortran,patch] Fix PR33957, rejects valid init. expr.
- From: "François-Xavier Coudert" <fxcoudert at gmail dot com>
- To: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 16 Nov 2007 18:07:53 +0000
- Subject: Re: [fortran,patch] Fix PR33957, rejects valid init. expr.
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=YqlPMtaykDQ5SoEPlMZivgFcS+f9dSmo5RJupI5K2Ug=; b=hBKVDc26dUy1/3EUWHrWgcO36AhLEF8WoUV80LiMXeHW40O8RIrTFUe3Sjqc/a0ichMxNxVjSmG2nQKKSResOt8Ur2qdblMKpspVWP2HUhA3BrBhWQ9qmHy4HyHOvSInYnJ8KfWKNzZYkwVg4ZAhNqA0p9AHJBQpTpNHLZiYXd0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jd1cHG8UVmFzLMq5ihbPnS0m11JtegvinO6iEHMBkwRfS7ng5eJWOdxTUSZdASFu0Jt4keme3bqfcPdXZAaCO8YwNl9aa8RFOg6Xj7ckrmeLL7uLxdraRF0PoufjPV3ESLFmNgm8apmmjJ7OX1nyflJc3Md/Rc2aoB6Z2ZQVHLU=
- References: <19c433eb0711091033v2826307ap5c5b791cff9c352e@mail.gmail.com>
ping
On Nov 9, 2007 6:33 PM, François-Xavier Coudert <fxcoudert@gmail.com> wrote:
> Patch below fixes PR33957, a rejects-valid bug: it does so by not
> emitting an error in check_inquiry() when we don't recognize a
> function as an inquiry function, but simply bailing out. When
> appropriate, an error will be emitted from the function that called
> check_inquiry(). And anyway, I think this error message doesn't make
> sense: we say that "inquiry function 'FOO' is not permitted in an
> init. expr.", when in fact we did not recognize FOO as an inquiry
> function.
>
> Regtested on x86_64-linux, will come with a testcase & ChangeLog, OK to commit?
>
> FX
>
>
>
> Index: expr.c
> ===================================================================
> --- expr.c (revision 129869)
> +++ expr.c (working copy)
> @@ -1981,11 +1981,7 @@ check_inquiry (gfc_expr *e, int not_rest
> break;
>
> if (functions[i] == NULL)
> - {
> - gfc_error ("Inquiry function '%s' at %L is not permitted "
> - "in an initialization expression", name, &e->where);
> - return MATCH_ERROR;
> - }
> + return MATCH_ERROR;
>
> /* At this point we have an inquiry function with a variable argument. The
> type of the variable might be undefined, but we need it now, because the
>