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/103138] [12 Regression] ICE in gfc_simplify_cshift, at fortran/simplify.c:2139 Date: Mon, 08 Nov 2021 20:40:20 +0000 [thread overview] Message-ID: <bug-103138-4-tNKjiHvLn2@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103138-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103138 anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anlauf at gcc dot gnu.org Ever confirmed|0 |1 Last reconfirmed| |2021-11-08 Status|UNCONFIRMED |NEW --- Comment #1 from anlauf at gcc dot gnu.org --- Naive patch: diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c index d675f2c3aef..6cce7703667 100644 --- a/gcc/fortran/simplify.c +++ b/gcc/fortran/simplify.c @@ -2109,6 +2109,9 @@ gfc_simplify_cshift (gfc_expr *array, gfc_expr *shift, gfc_expr *dim) else which = 0; + if (array->shape == NULL) + return NULL; + gfc_array_size (array, &size); arraysize = mpz_get_ui (size); mpz_clear (size); However, this leads to a bogus error for the testcase: pr103138.f90:5:31: 5 | integer, parameter :: b(2) = cshift(a, 1) | 1 Error: transformational intrinsic 'cshift' at (1) is not permitted in an initialization expression
next prev parent reply other threads:[~2021-11-08 20:40 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-08 18:38 [Bug fortran/103138] New: " gscfq@t-online.de 2021-11-08 20:40 ` anlauf at gcc dot gnu.org [this message] 2021-11-08 22:17 ` [Bug fortran/103138] " anlauf at gcc dot gnu.org 2021-11-09 8:33 ` [Bug fortran/103138] [12 Regression] ICE in gfc_simplify_cshift, at fortran/simplify.c:2139 since r12-4967-gbcf3728abe848888 marxin at gcc dot gnu.org 2021-11-09 11:24 ` rguenth at gcc dot gnu.org 2021-11-10 19:42 ` cvs-commit at gcc dot gnu.org 2021-11-11 20:17 ` cvs-commit at gcc dot gnu.org 2021-11-13 20:15 ` cvs-commit at gcc dot gnu.org 2022-05-06 8:31 ` [Bug fortran/103138] [12/13 " jakub at gcc dot gnu.org 2022-06-30 19:01 ` cvs-commit at gcc dot gnu.org 2022-07-03 19:44 ` cvs-commit at gcc dot gnu.org 2022-07-03 20:13 ` cvs-commit at gcc dot gnu.org 2022-07-03 20:29 ` cvs-commit at gcc dot gnu.org 2022-07-03 20:31 ` 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-103138-4-tNKjiHvLn2@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).