public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "kargl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/103507] ICE in resolve_block_construct, at fortran/resolve.c:10787 Date: Wed, 01 Dec 2021 15:00:20 +0000 [thread overview] Message-ID: <bug-103507-4-bYfcwVXwGn@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103507-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103507 kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #2 from kargl at gcc dot gnu.org --- This patch prevents the ICE, but is not as elegant as I would like. diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index f074a0ab3a1..08f657407da 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -17553,6 +17553,14 @@ gfc_resolve (gfc_namespace *ns) code_stack *old_cs_base; struct gfc_omp_saved_state old_omp_state; + if (!ns) + { + int ecnt; + gfc_get_errors (NULL, &ecnt); + if (ecnt > 0) + gfc_fatal_error ("Namespace corruption due to previous errors"); + } + if (ns->resolved) return; The problem seems to be with one of more namespaces being incomplete and/or overlapping.
prev parent reply other threads:[~2021-12-01 15:00 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-30 18:50 [Bug fortran/103507] New: " gscfq@t-online.de 2021-12-01 9:29 ` [Bug fortran/103507] " marxin at gcc dot gnu.org 2021-12-01 15:00 ` kargl at gcc dot gnu.org [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=bug-103507-4-bYfcwVXwGn@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).