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/101327] ICE in find_array_element, at fortran/expr.c:1355 Date: Mon, 30 Aug 2021 19:35:17 +0000 [thread overview] Message-ID: <bug-101327-4-B4mcoIWVFO@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-101327-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101327 anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anlauf at gcc dot gnu.org --- Comment #2 from anlauf at gcc dot gnu.org --- Slightly more compact resulting code with: diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 35563a78697..dfecc3012e1 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -1337,7 +1337,9 @@ find_array_element (gfc_constructor_base base, gfc_array_ref *ar, for (i = 0; i < ar->dimen; i++) { if (!gfc_reduce_init_expr (ar->as->lower[i]) - || !gfc_reduce_init_expr (ar->as->upper[i])) + || !gfc_reduce_init_expr (ar->as->upper[i]) + || ar->as->upper[i]->expr_type != EXPR_CONSTANT + || ar->as->lower[i]->expr_type != EXPR_CONSTANT) { t = false; cons = NULL; @@ -1351,9 +1353,6 @@ find_array_element (gfc_constructor_base base, gfc_array_ref *ar, goto depart; } - gcc_assert (ar->as->upper[i]->expr_type == EXPR_CONSTANT - && ar->as->lower[i]->expr_type == EXPR_CONSTANT); - /* Check the bounds. */ if ((ar->as->upper[i] && mpz_cmp (e->value.integer, Steve, are you going to submit this or your version?
next prev parent reply other threads:[~2021-08-30 19:35 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-05 16:38 [Bug fortran/101327] New: " gscfq@t-online.de 2021-07-06 17:50 ` [Bug fortran/101327] " kargl at gcc dot gnu.org 2021-08-30 19:35 ` anlauf at gcc dot gnu.org [this message] 2021-08-30 20:02 ` sgk at troutmask dot apl.washington.edu 2021-08-30 20:13 ` anlauf at gcc dot gnu.org 2021-08-30 21:41 ` anlauf at gcc dot gnu.org 2021-09-07 18:52 ` cvs-commit at gcc dot gnu.org 2021-09-11 19:01 ` cvs-commit at gcc dot gnu.org 2021-09-16 18:33 ` cvs-commit at gcc dot gnu.org 2021-09-30 19:28 ` cvs-commit at gcc dot gnu.org 2021-09-30 19:30 ` 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-101327-4-B4mcoIWVFO@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).