From: Tobias Burnus <tburnus@baylibre.com>
To: Paul-Antoine Arras <parras@baylibre.com>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 6/7] OpenMP: Fortran front-end support for dispatch + adjust_args
Date: Tue, 28 May 2024 09:14:28 +0200 [thread overview]
Message-ID: <043633bd-be87-4267-8803-163d5a60e96d@baylibre.com> (raw)
In-Reply-To: <20240527115439.3967217-7-parras@baylibre.com>
Hi PA, hi all,
two remarks while quickly browsing the code:
Paul-Antoine Arras:
> + if (n->sym->ts.type != BT_DERIVED
> + || !n->sym->ts.u.derived->ts.is_iso_c)
> + {
> + gfc_error ("argument list item %qs in "
> + "%<need_device_ptr%> at %L must be of "
> + "TYPE(C_PTR)",
> + n->sym->name, &n->where);
I think you need to rule out 'c_funptr' as well, e.g. via:
|| (n->sym->ts.u.derived->intmod_sym_id
!= ISOCBINDING_PTR)))
I do note that in openmp.cc, we have one check which checks explicitly
for c_ptr and one existing one which only checks for (c_ptr or
c_funptr); can you fix that one as well?
* * *
But I mainly miss an update to 'module.cc' for the 'declare variant'
change; the 'adjust_args' (for 'need_device_ptr', only) list items have
to be saved in the .mod file - otherwise the following will not work:
<some-file>-aux.f90
! { dg-do compile { target skip-all-targets } }
module my_mod
...
!$omp declare variant ... adjust_args(need_device_ptr: ...)
...
end module
<some-file>.f90
{ dg-do ...
! { dg-additional-sources <some-file>-aux.f90 }
...
call <base-function>
...
!$omp displatch
call <base-function>
end
For C++ modules, it should be fine as those for those, the tree is dumped.
Tobias
next prev parent reply other threads:[~2024-05-28 7:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 11:54 [PATCH 0/7] OpenMP: dispatch + adjust_args support Paul-Antoine Arras
2024-05-27 11:54 ` [PATCH 1/7] OpenMP: dispatch + adjust_args tree data structures and front-end interfaces Paul-Antoine Arras
2024-05-27 11:54 ` [PATCH 2/7] OpenMP: middle-end support for dispatch + adjust_args Paul-Antoine Arras
2024-05-27 11:54 ` [PATCH 3/7] OpenMP: C front-end " Paul-Antoine Arras
2024-05-27 11:54 ` [PATCH 4/7] OpenMP: C++ " Paul-Antoine Arras
2024-05-27 11:54 ` [PATCH 5/7] OpenMP: common C/C++ testcases " Paul-Antoine Arras
2024-05-27 11:54 ` [PATCH 6/7] OpenMP: Fortran front-end support " Paul-Antoine Arras
2024-05-28 7:14 ` Tobias Burnus [this message]
2024-05-31 10:07 ` Paul-Antoine Arras
2024-05-27 11:54 ` [PATCH 7/7] OpenMP: update documentation for dispatch and adjust_args Paul-Antoine Arras
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=043633bd-be87-4267-8803-163d5a60e96d@baylibre.com \
--to=tburnus@baylibre.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=parras@baylibre.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).