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>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>, fortran <fortran@gcc.gnu.org>
Subject: Re: [Patch, fortran] PR103471 - [11/12/13/14 Regression] ICE in gfc_typenode_for_spec, at fortran/trans-types.c:1114
Date: Sat, 20 Apr 2024 15:05:12 +0200	[thread overview]
Message-ID: <a4b50ec3-a098-4677-85a7-d19d7142bbe7@gmx.de> (raw)
In-Reply-To: <CAGkQGiLDU8GdZYa1t=yNdUAi1Ce6=VRgU4wESL7+NsQaBRQHEQ@mail.gmail.com>

Hi Paul!

On 4/20/24 09:54, Paul Richard Thomas wrote:
>> subroutine sub
>>     implicit none
>>     real, external :: x
>>     real           :: y(10)
>>     integer :: kk
>>     print *, [real(x(k))]
>> !  print *, [real(y(k))]
>> end
>>
>
> This is another problem, somewhere upstream from resolve.cc, which I have
> just spent an hour failing to find. In the presence of both print
> statements, in no matter which order, it is the error in trans-decl.cc that
> applies.

Indeed, the gfc_fatal_error always wins.

(I had tried to replace it with gfc_error()/return NULL_TREE, but then
I hit an ICE later on.  When trying to find out who added the said
code, guess whom I found :)

>
>> Thus I have the impression that the testcase tests something different
>> on the one hand, and on the other I wonder if we would want to change
>> the error message and replace "no default type" to "no IMPLICIT type".
>> It still would not hit the fuzzy check, but that is something that
>> might not be important now.
>>
>
> The fuzzy check was intended to ensure that the error was being detected in
> the "right" place. I want to keep the "no default type" message for the
> time being at least so as to identify exactly where it comes from. Getting
> to trans-decl.cc with an unknown type is just wrong.

True.

> I'll come back to you on this.

This PR is marked as a regression.  Depending on your progress,
it might be worth to consider fixing what you think is needed
to get rid of the regression marker and defer the improvement
of the diagnostics to a second patch.

Harald

> Thanks for the report.
>
> Paul
>


  reply	other threads:[~2024-04-20 13:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAGkQGiJv6oqU8_PWiWq-U4BpyDrk8nhvqtm8PC56cQVZWJQpxw@mail.gmail.com>
2024-04-19 17:56 ` Paul Richard Thomas
2024-04-19 18:33 ` Harald Anlauf
2024-04-20  7:54   ` Paul Richard Thomas
2024-04-20 13:05     ` Harald Anlauf [this message]
2024-04-20 17:31       ` Paul Richard Thomas

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=a4b50ec3-a098-4677-85a7-d19d7142bbe7@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).