public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/105318] New: [OpenMP] is_device_ptr rejects valid arguments to has_device_addr
@ 2022-04-20 12:29 burnus at gcc dot gnu.org
2022-08-17 6:48 ` [Bug fortran/105318] " burnus at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2022-04-20 12:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105318
Bug ID: 105318
Summary: [OpenMP] is_device_ptr rejects valid arguments to
has_device_addr
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: openmp, rejects-valid
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
CC: marcel at codesourcery dot com
Target Milestone: ---
OpenMP 5.2 has the following (likewise wording in 5.1):
"If the is_device_ptr clause is specified on a target construct, if any list
item
is not of type C_PTR, the behavior is as if the list item appeared in a
has_device_addr clause. Support for such list items in an is_device_ptr
clause is
deprecated."
However, input is rejected due to the OpenMP 5.0 checks:
12 | !$omp target is_device_ptr(bbbb, aaaa)
| 1
Error: Non-dummy object ‘bbbb’ in IS_DEVICE_PTR clause at (1)
12 | !$omp target is_device_ptr(bbbb, aaaa)
| 1
Error: ALLOCATABLE object ‘bbbb’ in IS_DEVICE_PTR clause at (1)
For:
program main
implicit none
integer, allocatable :: aaa(:,:,:)
allocate (aaa(-4:10,-3:8,2))
call test_ptr (aaa)
deallocate (aaa)
contains
subroutine test_ptr (aaaa)
integer, allocatable :: aaaa(:,:,:), bbbb(:,:,:)
!$omp target data map(bbbb, aaaa)
!$omp target data use_device_ptr(bbbb, aaaa)
!$omp target is_device_ptr(bbbb, aaaa)
! ...
!$omp end target
!$omp end target data
!$omp end target data
deallocate (bbbb)
end subroutine test_ptr
end program main
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/105318] [OpenMP] is_device_ptr rejects valid arguments to has_device_addr
2022-04-20 12:29 [Bug fortran/105318] New: [OpenMP] is_device_ptr rejects valid arguments to has_device_addr burnus at gcc dot gnu.org
@ 2022-08-17 6:48 ` burnus at gcc dot gnu.org
2022-09-30 11:37 ` [Bug fortran/105318] [OpenMP][5.1] " cvs-commit at gcc dot gnu.org
2022-09-30 11:42 ` burnus at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2022-08-17 6:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105318
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Likewise, the following is now permitted:
type(c_ptr) :: aptr
...
!$omp target is_device_ptr(aPtr)
but still rejected with:
Error: Non-dummy object ‘aptr’ in IS_DEVICE_PTR clause at (1)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/105318] [OpenMP][5.1] is_device_ptr rejects valid arguments to has_device_addr
2022-04-20 12:29 [Bug fortran/105318] New: [OpenMP] is_device_ptr rejects valid arguments to has_device_addr burnus at gcc dot gnu.org
2022-08-17 6:48 ` [Bug fortran/105318] " burnus at gcc dot gnu.org
@ 2022-09-30 11:37 ` cvs-commit at gcc dot gnu.org
2022-09-30 11:42 ` burnus at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-09-30 11:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105318
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tobias Burnus <burnus@gcc.gnu.org>:
https://gcc.gnu.org/g:10a116104969b3ecc9ea4abdd5436c66fd78d537
commit r13-2980-g10a116104969b3ecc9ea4abdd5436c66fd78d537
Author: Tobias Burnus <tobias@codesourcery.com>
Date: Fri Sep 30 13:27:32 2022 +0200
Fortran: Update use_device_ptr for OpenMP 5.1 [PR105318]
OpenMP 5.1 added has_device_addr and relaxed the restrictions for
use_device_ptr, including processing non-type(c_ptr) arguments as
if has_device_addr was used. (There is a semantic difference.)
For completeness, the likewise change was done for 'use_device_ptr',
where non-type(c_ptr) arguments now use use_device_addr.
Finally, a warning for 'device(omp_{initial,invalid}_device)' was
silenced on the way as affecting the new testcase.
PR fortran/105318
gcc/fortran/ChangeLog:
* openmp.cc (resolve_omp_clauses): Update is_device_ptr
restrictions
for OpenMP 5.1 and map to has_device_addr where applicable; map
use_device_ptr to use_device_addr where applicable.
Silence integer-range warning for
device(omp_{initial,invalid}_device).
libgomp/ChangeLog:
* testsuite/libgomp.fortran/is_device_ptr-2.f90: New test.
gcc/testsuite/ChangeLog:
* gfortran.dg/gomp/is_device_ptr-1.f90: Remove dg-error.
* gfortran.dg/gomp/is_device_ptr-2.f90: Likewise.
* gfortran.dg/gomp/is_device_ptr-3.f90: Update tree-scan-dump.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/105318] [OpenMP][5.1] is_device_ptr rejects valid arguments to has_device_addr
2022-04-20 12:29 [Bug fortran/105318] New: [OpenMP] is_device_ptr rejects valid arguments to has_device_addr burnus at gcc dot gnu.org
2022-08-17 6:48 ` [Bug fortran/105318] " burnus at gcc dot gnu.org
2022-09-30 11:37 ` [Bug fortran/105318] [OpenMP][5.1] " cvs-commit at gcc dot gnu.org
@ 2022-09-30 11:42 ` burnus at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2022-09-30 11:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105318
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
FIXED in GCC 13. (Side note: has_device_addr was added in GCC 12.)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-09-30 11:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-20 12:29 [Bug fortran/105318] New: [OpenMP] is_device_ptr rejects valid arguments to has_device_addr burnus at gcc dot gnu.org
2022-08-17 6:48 ` [Bug fortran/105318] " burnus at gcc dot gnu.org
2022-09-30 11:37 ` [Bug fortran/105318] [OpenMP][5.1] " cvs-commit at gcc dot gnu.org
2022-09-30 11:42 ` burnus at gcc dot gnu.org
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).