public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tobias Burnus <tobias@codesourcery.com>
To: Harald Anlauf <anlauf@gmx.de>, fortran <fortran@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] PR fortran/102816 - [12 Regression] ICE in resolve_structure_cons, at fortran/resolve.c:1467
Date: Tue, 26 Oct 2021 12:05:00 +0200	[thread overview]
Message-ID: <85212cfc-dd9b-e3e4-8d57-4dcca217236f@codesourcery.com> (raw)
In-Reply-To: <trinity-a6d0b6df-2771-4451-a137-5d73be1bfe42-1634931383437@3c-app-gmx-bs21>

Dear Harald, hi all,

On 22.10.21 21:36, Harald Anlauf via Fortran wrote:
> the recently introduced shape validation for array components
> in DT constructors did not properly deal with invalid code
> created by ingenious testers.
>
> Obvious solution: replace the gcc_assert by a suitable error message.
>
> Regarding the error message: before the shape validation, gfortran
> would emit the same error message twice referring to the same line,
> namely the bad declaration of the component.  With the attached patch
> we get one error message for the bad declaration of the component,
> and one for the structure constructor referring to that DT component.
> One could easily change that and make the second message refer to the
> same as the declaration, giving two errors for the same line.
>
> Comments / opinions?

Does not really matter in this case as long as there is one error for
the invalid "integer :: a([2])".

In other cases, it requires some careful weighting whether error should
have the error location "use m" or where the symbol is used. (Here, it
cannot occur as the module won't get generated and an error is already
printed at the proper location.)

> Regtested on x86_64-pc-linux-gnu.  OK?

OK.

Tobias

-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955

  reply	other threads:[~2021-10-26 10:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22 19:36 Harald Anlauf
2021-10-26 10:05 ` Tobias Burnus [this message]
2021-10-26 12:00   ` Harald Anlauf

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=85212cfc-dd9b-e3e4-8d57-4dcca217236f@codesourcery.com \
    --to=tobias@codesourcery.com \
    --cc=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@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).