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/107054] [10/11/12/13 Regression] ICE in gfc_simplify_unpack, at fortran/simplify.cc:8461 Date: Tue, 27 Sep 2022 18:02:10 +0000 [thread overview] Message-ID: <bug-107054-4-ELUlsOdbV5@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-107054-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107054 anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Target Milestone|--- |10.5 CC| |anlauf at gcc dot gnu.org Last reconfirmed| |2022-09-27 Status|UNCONFIRMED |NEW Priority|P3 |P4 --- Comment #2 from anlauf at gcc dot gnu.org --- Confirmed. We hit an assert that is fixed by: diff --git a/gcc/fortran/simplify.cc b/gcc/fortran/simplify.cc index c0fbd0ed7c2..6ac92cf9db8 100644 --- a/gcc/fortran/simplify.cc +++ b/gcc/fortran/simplify.cc @@ -8458,9 +8458,16 @@ gfc_simplify_unpack (gfc_expr *vector, gfc_expr *mask, gfc_expr *field) { if (mask_ctor->expr->value.logical) { - gcc_assert (vector_ctor); - e = gfc_copy_expr (vector_ctor->expr); - vector_ctor = gfc_constructor_next (vector_ctor); + if (vector_ctor) + { + e = gfc_copy_expr (vector_ctor->expr); + vector_ctor = gfc_constructor_next (vector_ctor); + } + else + { + gfc_free_expr (result); + return NULL; + } } else if (field->expr_type == EXPR_ARRAY) e = gfc_copy_expr (field_ctor->expr);
next prev parent reply other threads:[~2022-09-27 18:02 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-27 16:19 [Bug fortran/107054] New: " gscfq@t-online.de 2022-09-27 16:20 ` [Bug fortran/107054] " gscfq@t-online.de 2022-09-27 18:02 ` anlauf at gcc dot gnu.org [this message] 2022-09-27 19:07 ` anlauf at gcc dot gnu.org 2022-09-27 19:40 ` cvs-commit at gcc dot gnu.org 2022-09-29 10:44 ` marxin at gcc dot gnu.org 2022-09-29 18:39 ` cvs-commit at gcc dot gnu.org 2022-09-30 20:33 ` cvs-commit at gcc dot gnu.org 2022-09-30 20:34 ` cvs-commit at gcc dot gnu.org 2022-09-30 20:35 ` anlauf 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-107054-4-ELUlsOdbV5@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).