public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gmx.de>
To: Paul Richard Thomas <paul.richard.thomas@gmail.com>,
	"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [Patch, fortran] PR104625 ICE in fixup_array_ref, at fortran/resolve.cc:9275 since r10-2912-g70570ec192745095
Date: Thu, 26 Oct 2023 21:22:11 +0200	[thread overview]
Message-ID: <9da28bdc-a6a6-4b26-83b2-17620c4ca975@gmx.de> (raw)
In-Reply-To: <CAGkQGiK6E7WVUobQkqUHu+QEoger=nTq-4jXVtGTS4-k34LBUA@mail.gmail.com>

Hi Paul,

this looks all good to me.

It is great that you added the handling of nested parentheses to the
resolution, as that appears to be needed also in other situations.

Thanks for the patch!

Harald

On 10/26/23 19:14, Paul Richard Thomas wrote:
> Hi All,
>
> The attached patch fixes the original problem, in which parentheses around
> the selector in select type constructs caused ICES. Stacked parentheses
> caused problems in trans-stmt.cc. Rather than tracking this down, the
> redundant parentheses were removed on resolution of the selector
> expression.
>
> Fixing the primary problem revealed "Unclassifiable statement" errors when
> using array references of the associate variable and this was fixed as
> well. Finally, the error triggered by using associate variables associated
> with non-variable selectors was corrected to ensure that only vector
> indexed selectors were flagged up as such. The secondary error in
> associate_55.f90 was corrected for this, since the selector might or might
> not be vector indexed.
>
> Regtests fine - OK for trunk?
>
> Paul
>
> Fortran: Fix some problems with SELECT TYPE selectors [PR104625].
>
> 2023-10-26  Paul Thomas  <pault@gcc.gnu.org>
>
> gcc/fortran
> PR fortran/104625
> * expr.cc (gfc_check_vardef_context): Check that the target
> does have a vector index before emitting the specific error.
> * match.cc (copy_ts_from_selector_to_associate): Ensure that
> class valued operator expressions set the selector rank and
> use the rank to provide the associate variable with an
> appropriate array spec.
> * resolve.cc (resolve_operator): Reduce stacked parentheses to
> a single pair.
> (fixup_array_ref): Extract selector symbol from parentheses.
>
> gcc/testsuite/
> PR fortran/104625
> * gfortran.dg/pr104625.f90: New test.
> * gfortran.dg/associate_55.f90: Change error check text.
>


      reply	other threads:[~2023-10-26 19:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-26 17:14 Paul Richard Thomas
2023-10-26 19:22 ` Harald Anlauf [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=9da28bdc-a6a6-4b26-83b2-17620c4ca975@gmx.de \
    --to=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=paul.richard.thomas@gmail.com \
    /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).