From: "José Rui Faustino de Sousa" <jrfsousa@gmail.com>
To: Tobias Burnus <tobias@codesourcery.com>,
fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [Patch, fortran V2] PR fortran/93308/93963/94327/94331/97046 problems raised by descriptor handling
Date: Mon, 21 Jun 2021 15:51:45 +0000 [thread overview]
Message-ID: <164eff68-d663-f3e3-31b0-ca0349a91dd3@gmail.com> (raw)
In-Reply-To: <f30f45a2-5889-38d7-7199-3451c87d5bf4@codesourcery.com>
On 21/06/21 13:46, Tobias Burnus wrote:
> Hi José,
>
> (in principle, I'd like to have the libgfortran function moved to the
> compiler proper to avoid some issues, but that's admittedly a task
> independent of your work.)
>
cfi_desc_to_gfc_desc and gfc_desc_to_cfi_desc from ISO_c_binding.c, right?
Since fixing:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100917
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100910
would very likely require passing an additional "kind" parameter (and
future descriptor unification) that would be a good idea.
I had a patch to do this, passing the kind value, but AFAIR there were
issues with kind values for C_PTR and C_FUNPTR (and I didn't want to
mess with the ABI also in one go)... But I might have fixed that
somewhere else afterwards...
So, I could look further into that. Were would you like them placed?
> LGTM – except for one minor nit. In trans-expr.c's
> gfc_conv_gfc_desc_to_cfi_desc:
>
> /* Transfer values back to gfc descriptor. */
> + if (cfi_attribute != 2
> + && !fsym->attr.value
> + && fsym->attr.intent != INTENT_IN)
>
> Can you add after the '2' the string ' /* CFI_attribute_other. */'
> to make the number less magic.
>
Yes... I had the same idea... :-) But all those constants are defined in
"ISO_Fortran_binding.h"... And moving all those definitions would be a
major change... So I left it as it was...
What do you suggest I do?
Best regards,
José Rui
next prev parent reply other threads:[~2021-06-21 15:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-14 23:09 José Rui Faustino de Sousa
2021-06-21 13:46 ` Tobias Burnus
2021-06-21 15:51 ` José Rui Faustino de Sousa [this message]
2021-06-21 16:46 ` Tobias Burnus
2021-06-21 17:52 ` José Rui Faustino de Sousa
2021-06-21 20:29 ` Tobias Burnus
2021-06-22 7:11 ` Tobias Burnus
2021-07-26 12:43 ` Committed: " Tobias Burnus
-- strict thread matches above, loose matches on Subject: below --
2021-06-03 15:04 [Patch, fortran] PR fortran/100120/100816/100818/100819/100821 problems raised by aggregate data types dhumieres.dominique
2021-06-04 15:24 ` Paul Richard Thomas
2021-06-05 12:40 ` dhumieres.dominique
2021-06-06 17:58 ` Re:[Patch, fortran] PR fortran/93308/93963/94327/94331/97046 problems raised by descriptor handling dhumieres.dominique
2021-06-19 10:57 ` [Patch, fortran v2] " dhumieres.dominique
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=164eff68-d663-f3e3-31b0-ca0349a91dd3@gmail.com \
--to=jrfsousa@gmail.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=tobias@codesourcery.com \
/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: link
Be 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).