public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Koenig <tkoenig@netcologne.de>
To: Harald Anlauf <anlauf@gmx.de>, fortran <fortran@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>,
	kargl@gcc.gnu.org
Subject: Re: [PATCH] Fortran: error recovery on associate with bad selector [PR107577]
Date: Thu, 24 Nov 2022 19:58:39 +0100	[thread overview]
Message-ID: <bf0c8b4c-3a05-6de3-44e1-a0ad35fd3e85@netcologne.de> (raw)
In-Reply-To: <trinity-dbdce3d4-1d85-4628-b9ea-d4935aaa02df-1669153996745@3c-app-gmx-bap12>

Hi Harald,

> please find attached an obvious patch by Steve for a technical
> regression that resulted from improvements in error recovery
> of bad uses of associate.
> 
> Regtested on x86_64-pc-linux-gnu.
> 
> Will commit soon unless there are comments.

Obvious enough, I think.  Thanks!

> As a sidenote: the testcase shows that we resolve the associate
> names quite often, likely more often than necessary, resulting
> in many error messages produced for the same line of code.  In
> the present case, each use of the bad name produces two errors,
> one where it is used, and one at the associate statement.
> That is probably not helpful for the user.

We have an "error" flag in gfc_expr, which we use infrequently to
avoid repetitions of errors.  If an error has already been issued
for an expression, then we could set this.  We would have to be careful
about resetting the error on matching though, so it is probably better
to only use it during resolution.

Best regards

	Thomas


      reply	other threads:[~2022-11-24 18:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22 21:53 Harald Anlauf
2022-11-24 18:58 ` Thomas Koenig [this message]

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=bf0c8b4c-3a05-6de3-44e1-a0ad35fd3e85@netcologne.de \
    --to=tkoenig@netcologne.de \
    --cc=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kargl@gcc.gnu.org \
    /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).