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/95503] ICE in gfc_is_simply_contiguous, at fortran/expr.c:5844 Date: Wed, 03 Jun 2020 18:40:03 +0000 [thread overview] Message-ID: <bug-95503-4-CU7hqw9b8D@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-95503-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95503 anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Known to work| |7.4.1, 8.3.1 Last reconfirmed| |2020-06-03 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW CC| |anlauf at gcc dot gnu.org Known to fail| |10.1.1, 11.0, 9.3.1 --- Comment #1 from anlauf at gcc dot gnu.org --- The following patch fixes the ICE: diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index a9fa03ad153..8daa7bb8d06 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -4346,7 +4346,9 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue, contiguous. Be lenient in the definition of what counts as contiguous. */ - if (lhs_attr.contiguous && !gfc_is_simply_contiguous (rvalue, false, true)) + if (lhs_attr.contiguous + && lhs_attr.dimension > 0 + && !gfc_is_simply_contiguous (rvalue, false, true)) gfc_warning (OPT_Wextra, "Assignment to contiguous pointer from " "non-contiguous target at %L", &rvalue->where); Not regtested though. In some sense a 9/10/11 regression, although %re etc. did not exist in 8 and older.
next prev parent reply other threads:[~2020-06-03 18:40 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-03 15:46 [Bug fortran/95503] New: " gscfq@t-online.de 2020-06-03 18:40 ` anlauf at gcc dot gnu.org [this message] 2020-06-03 22:04 ` [Bug fortran/95503] [9/10/11 Regression] " tkoenig at gcc dot gnu.org 2020-06-04 18:48 ` anlauf at gcc dot gnu.org 2020-06-11 13:49 ` cvs-commit at gcc dot gnu.org 2020-06-14 12:40 ` cvs-commit at gcc dot gnu.org 2020-06-14 13:04 ` cvs-commit at gcc dot gnu.org 2020-06-14 13:28 ` 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-95503-4-CU7hqw9b8D@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).