public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "kargl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/100607] ICE with SELECT RANK Date: Mon, 03 Apr 2023 01:27:35 +0000 [thread overview] Message-ID: <bug-100607-4-ayzGClNxCF@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-100607-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100607 kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|ice-on-invalid-code | Priority|P3 |P4 --- Comment #2 from kargl at gcc dot gnu.org --- Remove ice-on-invalid-code as I don't get an ICE. The following patch suppresses the error message with the temporary variable and removes duplicated code. Please commit. diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc index 46585879ddc..3462d43f346 100644 --- a/gcc/fortran/resolve.cc +++ b/gcc/fortran/resolve.cc @@ -9909,11 +9909,6 @@ resolve_select_rank (gfc_code *code, gfc_namespace *old_ns) || gfc_expr_attr (code->expr1).pointer)) gfc_error ("RANK (*) at %L cannot be used with the pointer or " "allocatable selector at %L", &c->where, &code->expr1->where); - - if (case_value == -1 && (gfc_expr_attr (code->expr1).allocatable - || gfc_expr_attr (code->expr1).pointer)) - gfc_error ("RANK (*) at %L cannot be used with the pointer or " - "allocatable selector at %L", &c->where, &code->expr1->where); } /* Add EXEC_SELECT to switch on rank. */ @@ -12948,7 +12943,9 @@ resolve_fl_var_and_proc (gfc_symbol *sym, int mp_flag) if (allocatable) { - if (dimension && as->type != AS_ASSUMED_RANK) + if (dimension + && as->type != AS_ASSUMED_RANK + && !sym->attr.select_rank_temporary) { gfc_error ("Allocatable array %qs at %L must have a deferred " "shape or assumed rank", sym->name, &sym->declared_at);
next prev parent reply other threads:[~2023-04-03 1:27 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-14 21:10 [Bug fortran/100607] New: " burnus at gcc dot gnu.org 2021-05-16 13:34 ` [Bug fortran/100607] " dominiq at lps dot ens.fr 2022-06-06 21:33 ` kargl at gcc dot gnu.org 2022-06-07 4:35 ` kargl at gcc dot gnu.org 2023-04-03 1:27 ` kargl at gcc dot gnu.org [this message] 2023-04-03 20:16 ` anlauf at gcc dot gnu.org 2023-04-03 20:32 ` anlauf at gcc dot gnu.org 2023-04-03 21:28 ` sgk at troutmask dot apl.washington.edu 2023-05-29 23:10 ` kargl at gcc dot gnu.org 2023-06-01 19:26 ` anlauf at gcc dot gnu.org 2023-06-01 19:47 ` sgk at troutmask dot apl.washington.edu 2023-06-02 16:28 ` anlauf at gcc dot gnu.org 2023-06-02 17:59 ` cvs-commit at gcc dot gnu.org 2023-06-02 18:06 ` anlauf at gcc dot gnu.org 2023-06-02 18:17 ` sgk at troutmask dot apl.washington.edu 2023-06-03 18:21 ` cvs-commit at gcc dot gnu.org 2023-06-04 18:13 ` cvs-commit at gcc dot gnu.org 2023-06-04 18:22 ` cvs-commit 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-100607-4-ayzGClNxCF@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).