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/77667] ICE in expand_call, at calls.c:2588 Date: Tue, 04 Jan 2022 21:49:56 +0000 [thread overview] Message-ID: <bug-77667-4-KQz0z3fpTv@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-77667-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77667 anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anlauf at gcc dot gnu.org --- Comment #3 from anlauf at gcc dot gnu.org --- The following patch seems to work: diff --git a/gcc/fortran/data.c b/gcc/fortran/data.c index 839e04277ef..dee38e5de50 100644 --- a/gcc/fortran/data.c +++ b/gcc/fortran/data.c @@ -589,6 +589,15 @@ gfc_assign_data_value (gfc_expr *lvalue, gfc_expr *rvalue, mpz_t index, return false; } + if (rvalue->symtree && rvalue->symtree->n.sym + && !rvalue->symtree->n.sym->attr.target + && !gfc_is_constant_expr (rvalue)) + { + gfc_error ("non-constant initialization expression in DATA statement " + "at %L", &rvalue->where); + return false; + } + if (ref || (last_ts->type == BT_CHARACTER && rvalue->expr_type == EXPR_CONSTANT)) {
next parent reply other threads:[~2022-01-04 21:49 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-77667-4@http.gcc.gnu.org/bugzilla/> 2022-01-04 21:49 ` anlauf at gcc dot gnu.org [this message] 2022-01-04 22:07 ` anlauf at gcc dot gnu.org 2022-01-14 21:31 ` anlauf at gcc dot gnu.org 2022-01-16 20:48 ` 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-77667-4-KQz0z3fpTv@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).