public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "sandra at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/103258] [12 Regression] ICE in gfc_typenode_for_spec, at fortran/trans-types.c:1114 since r12-4979-gee11be7f2d788e60 Date: Sun, 12 Dec 2021 17:23:02 +0000 [thread overview] Message-ID: <bug-103258-4-yVdFruSXWQ@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103258-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103258 --- Comment #3 from sandra at gcc dot gnu.org --- This looks like an existing bug in error checking that was exposed by my patch to do... more error checking. :-S The problem is that gfc_set_default_type in symbol.c is setting sym->attr.untyped even when errors are suppressed or buffered and discarded during parsing. Since it's marked as having already been diagnosed, we aren't giving an error in subsequent calls where errors are *not* being suppressed or discarded, and thus compilation continues as if nothing were wrong, until it falls over. Previously we were resolving only the second operand "m" in the "(n+m)" expression in a situation where errors are buffered in the parsing stage, leaving "n" without the attr.untyped flag set so that it was being diagnosed later during the actual resolve phase of processing. Now it is setting that flag on both "n" and "m" so neither ever gives a real error. I've got a hacky patch to avoid setting sym->attr.untyped when a real error might not be given, but I'm not sure if it's the right solution. Maybe a better solution would be to emit the diagnostic somewhere other than gfc_set_default_type, at a known point in the processing where it'll only happen once?
next prev parent reply other threads:[~2021-12-12 17:23 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-15 18:22 [Bug fortran/103258] New: [12 Regression] ICE in gfc_typenode_for_spec, at fortran/trans-types.c:1114 gscfq@t-online.de 2021-11-16 8:25 ` [Bug fortran/103258] [12 Regression] ICE in gfc_typenode_for_spec, at fortran/trans-types.c:1114 since r12-4979-gee11be7f2d788e60 marxin at gcc dot gnu.org 2021-11-16 9:36 ` rguenth at gcc dot gnu.org 2021-11-16 16:39 ` sandra at gcc dot gnu.org 2021-12-12 17:23 ` sandra at gcc dot gnu.org [this message] 2021-12-12 17:25 ` sandra at gcc dot gnu.org 2022-01-05 3:29 ` sandra at gcc dot gnu.org 2022-01-05 17:03 ` cvs-commit at gcc dot gnu.org 2022-01-05 17:06 ` sandra 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-103258-4-yVdFruSXWQ@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).