From: Steve Kargl <sgk@troutmask.apl.washington.edu>
To: Mark Eggleston <mark.eggleston@codethink.co.uk>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>, fortran <fortran@gcc.gnu.org>
Subject: Re: [PATCH] fortran: ICE using undeclared symbol in array constructor, PR93484
Date: Tue, 11 Feb 2020 15:23:00 -0000 [thread overview]
Message-ID: <20200211152305.GB77655@troutmask.apl.washington.edu> (raw)
In-Reply-To: <b8ea9888-05e2-47bd-b8b1-d114af808138@codethink.co.uk>
On Tue, Feb 11, 2020 at 12:10:41PM +0000, Mark Eggleston wrote:
> Please find attached a patch for PR93484. The original author is Steve
> Kargl. I have added the test cases.
>
> OK for master?
I obviously think the patch is ok, but I'll let someone else review it.
>    Steven G. Kargl <kargl@gcc.gnu.org>
>
> Â Â Â PR fortran/93484
> Â Â Â * match.c (gfc_match_type_spec): Replace gfc_match_init_expr with
> Â Â Â gfc_match_expr. Return m if m is MATCH_NO or MATCH_ERROR.
>
> diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
> index a74cb8c5c19..03adfca9bd9 100644
> --- a/gcc/fortran/match.c
> +++ b/gcc/fortran/match.c
> @@ -2222,9 +2222,9 @@ gfc_match_type_spec (gfc_typespec *ts)
>
> found:
>
> - m = gfc_match_init_expr (&e);
> + m = gfc_match_expr (&e);
> if (m == MATCH_NO || m == MATCH_ERROR)
> - return MATCH_NO;
> + return m;
Might need
gfc_reduce_init_expr (e);
here. The kind type parameter should be a constant expression.
> /* If a comma appears, it is an intrinsic subprogram. */
> gfc_gobble_whitespace ();
next prev parent reply other threads:[~2020-02-11 15:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-11 12:10 Mark Eggleston
2020-02-11 15:23 ` Steve Kargl [this message]
2020-02-24 14:19 ` Mark Eggleston
2020-02-24 14:34 ` Thomas Koenig
2020-02-24 14:50 ` Mark Eggleston
2020-02-24 15:01 ` Tobias Burnus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200211152305.GB77655@troutmask.apl.washington.edu \
--to=sgk@troutmask.apl.washington.edu \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=mark.eggleston@codethink.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).