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/113377] Wrong code passing optional dummy argument to elemental procedure with optional dummy Date: Tue, 16 Jan 2024 21:05:00 +0000 [thread overview] Message-ID: <bug-113377-4-Yo9HNznEyk@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-113377-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113377 --- Comment #3 from anlauf at gcc dot gnu.org --- Created attachment 57108 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57108&action=edit Patch to play with This is a first attempt to outline code for handling scalar dummies with the VALUE attribute. This fixes the following variants of the declaration of dummy argument j in function one: integer, value, optional :: j integer, intent(in), optional :: j integer, intent(in), optional :: j(4) integer, intent(in), optional :: j(:) However, integer, allocatable,optional :: j still does not work: the code *in* the generated loop looks fine to me, but the scalarizer dereferences j before the loop. I think that this is correct F2018+, as ifx handles it fine. Not sure how to proceed here. Furthermore, the patch tries to cope (= prevent an ICE) with integer, allocatable,optional :: j(:) which I think might be invalid. At least it also crashed with ifx... Otherwise, the patch so far regtests ok.
next prev parent reply other threads:[~2024-01-16 21:05 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-13 14:21 [Bug fortran/113377] New: " anlauf at gcc dot gnu.org 2024-01-14 10:51 ` [Bug fortran/113377] " mikael at gcc dot gnu.org 2024-01-14 20:05 ` anlauf at gcc dot gnu.org 2024-01-16 21:05 ` anlauf at gcc dot gnu.org [this message] 2024-01-16 22:02 ` anlauf at gcc dot gnu.org 2024-01-19 18:46 ` mikael at gcc dot gnu.org 2024-01-19 19:25 ` mikael at gcc dot gnu.org 2024-01-19 21:16 ` anlauf at gcc dot gnu.org 2024-01-19 21:19 ` anlauf at gcc dot gnu.org 2024-01-21 20:24 ` cvs-commit at gcc dot gnu.org 2024-01-24 19:28 ` cvs-commit at gcc dot gnu.org 2024-01-25 18:26 ` anlauf at gcc dot gnu.org 2024-01-28 19:26 ` 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-113377-4-Yo9HNznEyk@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).