From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 26D2A3857C50; Wed, 20 Apr 2022 12:29:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 26D2A3857C50 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/105318] New: [OpenMP] is_device_ptr rejects valid arguments to has_device_addr Date: Wed, 20 Apr 2022 12:29:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: openmp, rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2022 12:29:50 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105318 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 l= ist 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 =E2=80=98bbbb=E2=80=99 in IS_DEVICE_PTR clause at (= 1) 12 | !$omp target is_device_ptr(bbbb, aaaa) | 1 Error: ALLOCATABLE object =E2=80=98bbbb=E2=80=99 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=