public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [Patch] Fortran: F2018 type(*),dimension(*) with scalars [PR104143]
       [not found] <86200df9-4b14-11ca-05db-1d033870f537@codesourcery.com>
@ 2022-09-20 19:59 ` Harald Anlauf
  2022-09-20 19:59   ` Harald Anlauf
  0 siblings, 1 reply; 2+ messages in thread
From: Harald Anlauf @ 2022-09-20 19:59 UTC (permalink / raw)
  To: fortran; +Cc: gcc-patches

Am 20.09.22 um 13:51 schrieb Tobias Burnus:
> In several cases, one just wants to have the address where an object starts
> without requiring the detour via 'c_loc' and the (locally) required 
> 'target'
> attribute.
> 
> In principle,  type(*),dimension(*)  of TS29113 permits this, except that
> 'dimension(*)' only permits arrays and array elements but not scalars.
> 
> Fortran 2018 modified this such that with 'type(*)' also scalars are 
> permitted.
> (See PR for the quotes.)
> 
> This patch implements this simple change. Before, implementations like MPI
> had to use '!GCC$ attribute NO_ARG_CHECK ::' in addition to 
> type(*),dimension(*)
> to achieve this. In GCC, we do likewise, but that's at least inside the 
> compiler,
> cf. libgomp/openacc{.f90,_lib.h}.
> 
> OK for mainline?

LGTM.

Thanks for the patch!




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Patch] Fortran: F2018 type(*),dimension(*) with scalars [PR104143]
  2022-09-20 19:59 ` [Patch] Fortran: F2018 type(*),dimension(*) with scalars [PR104143] Harald Anlauf
@ 2022-09-20 19:59   ` Harald Anlauf
  0 siblings, 0 replies; 2+ messages in thread
From: Harald Anlauf @ 2022-09-20 19:59 UTC (permalink / raw)
  To: Tobias Burnus, gcc-patches, fortran

Am 20.09.22 um 13:51 schrieb Tobias Burnus:
> In several cases, one just wants to have the address where an object starts
> without requiring the detour via 'c_loc' and the (locally) required
> 'target'
> attribute.
>
> In principle,  type(*),dimension(*)  of TS29113 permits this, except that
> 'dimension(*)' only permits arrays and array elements but not scalars.
>
> Fortran 2018 modified this such that with 'type(*)' also scalars are
> permitted.
> (See PR for the quotes.)
>
> This patch implements this simple change. Before, implementations like MPI
> had to use '!GCC$ attribute NO_ARG_CHECK ::' in addition to
> type(*),dimension(*)
> to achieve this. In GCC, we do likewise, but that's at least inside the
> compiler,
> cf. libgomp/openacc{.f90,_lib.h}.
>
> OK for mainline?

LGTM.

Thanks for the patch!


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-20 19:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <86200df9-4b14-11ca-05db-1d033870f537@codesourcery.com>
2022-09-20 19:59 ` [Patch] Fortran: F2018 type(*),dimension(*) with scalars [PR104143] Harald Anlauf
2022-09-20 19:59   ` Harald Anlauf

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).