public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "anlauf at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/103471] [11/12/13/14 Regression] ICE in gfc_typenode_for_spec, at fortran/trans-types.c:1114 Date: Thu, 18 Apr 2024 20:38:59 +0000 [thread overview] Message-ID: <bug-103471-4-bxE3EjuJEo@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103471-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103471 anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anlauf at gcc dot gnu.org --- Comment #7 from anlauf at gcc dot gnu.org --- (In reply to Paul Thomas from comment #6) > The current mainline and 13-branches now power through to the fatal error at > trans-decl.cc:1800. True, but the location does not look nice: pr103471.f90:1:9: 1 | program p | 1 Fatal Error: k at (1) has no default type compilation terminated. With the following tentative - but otherwise untested - change: diff --git a/gcc/fortran/trans-decl.cc b/gcc/fortran/trans-decl.cc index e160c5c98c1..602f35f0cab 100644 --- a/gcc/fortran/trans-decl.cc +++ b/gcc/fortran/trans-decl.cc @@ -1797,7 +1797,9 @@ gfc_get_symbol_decl (gfc_symbol * sym) } if (sym->ts.type == BT_UNKNOWN) - gfc_fatal_error ("%s at %C has no default type", sym->name); +// gfc_fatal_error ("%s at %C has no default type", sym->name); + gfc_fatal_error ("%s at %L has no default type", sym->name, + &sym->declared_at); if (sym->attr.intrinsic) gfc_internal_error ("intrinsic variable which isn't a procedure"); we are back at: pr103471.f90:3:21: 3 | print *, [real(x(k))] | 1 Fatal Error: k at (1) has no default type compilation terminated. This looks more user friendly.
next prev parent reply other threads:[~2024-04-18 20:39 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-29 18:48 [Bug fortran/103471] New: [9/10/11/12 " gscfq@t-online.de 2021-11-30 7:03 ` [Bug fortran/103471] " rguenth at gcc dot gnu.org 2021-11-30 14:20 ` marxin at gcc dot gnu.org 2021-12-23 0:35 ` kargl at gcc dot gnu.org 2022-05-27 9:46 ` [Bug fortran/103471] [10/11/12/13 " rguenth at gcc dot gnu.org 2022-06-28 10:47 ` jakub at gcc dot gnu.org 2023-07-07 10:41 ` [Bug fortran/103471] [11/12/13/14 " rguenth at gcc dot gnu.org 2024-04-11 17:34 ` pault at gcc dot gnu.org 2024-04-18 20:38 ` anlauf at gcc dot gnu.org [this message] 2024-04-19 6:02 ` pault at gcc dot gnu.org 2024-04-19 6:02 ` pault at gcc dot gnu.org 2024-04-19 7:25 ` pault at gcc dot gnu.org 2024-04-21 16:24 ` cvs-commit at gcc dot gnu.org 2024-04-21 16:34 ` [Bug fortran/103471] Missed no IMPLICIT type errors pault at gcc dot gnu.org
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=bug-103471-4-bxE3EjuJEo@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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: linkBe 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).