public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/90742] OpenACC/OpenMP target offloading: Fortran 'allocatable' scalars in 'firstprivate' clauses
       [not found] <bug-90742-4@http.gcc.gnu.org/bugzilla/>
@ 2021-06-09  8:39 ` burnus at gcc dot gnu.org
  2021-06-29 13:50 ` cvs-commit at gcc dot gnu.org
  2022-05-23 10:09 ` burnus at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-06-09  8:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90742

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org
             Status|WAITING                     |NEW

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Came up in context of my patch for PR92568 (gfortran.dg/gomp/defaultmap-8.f90)
and the following does not work neither for scalars nor for arrays:



integer, allocatable :: a, b(:)
a = 2     ! implicit allocation
b = [2]   ! implicit allocation
!$omp target firstprivate(a,b)
  if (a /= 2 .or. b(1) /= 1) stop 1
  a = 1
  b = 1
!$omp end target

if (a /= 2) stop 2
if (b(1) /= 2) stop 2
end



Namely (for a variant with only the scalar 'a'):

    .omp_data_arr.2.a = a;
    #pragma omp target num_teams(1) thread_limit(0) firstprivate(a) [child fn:
MAIN__._omp_fn.0 (.omp_data_arr.2, .omp_data_sizes.3, .omp_data_kinds.4)]
      {
        .omp_data_i = (const struct .omp_data_t.1 & restrict) &.omp_data_arr.2;
        D.3963 = .omp_data_i->a;
        a = D.3963;
        {
          D.3943 = *a;

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

* [Bug fortran/90742] OpenACC/OpenMP target offloading: Fortran 'allocatable' scalars in 'firstprivate' clauses
       [not found] <bug-90742-4@http.gcc.gnu.org/bugzilla/>
  2021-06-09  8:39 ` [Bug fortran/90742] OpenACC/OpenMP target offloading: Fortran 'allocatable' scalars in 'firstprivate' clauses burnus at gcc dot gnu.org
@ 2021-06-29 13:50 ` cvs-commit at gcc dot gnu.org
  2022-05-23 10:09 ` burnus at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-29 13:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90742

--- Comment #4 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:489c5dcf7b063000a5e223535eb425cf9748720a

commit r12-1870-g489c5dcf7b063000a5e223535eb425cf9748720a
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Tue Jun 29 15:50:23 2021 +0200

    libgomp.fortran/defaultmap-8.f90: Fix non-shared memory handling

    Disable some more parts of the test as firstprivate does not work yet
    due to PR fortran/90742.

    libgomp/
            * testsuite/libgomp.fortran/defaultmap-8.f90 (bar): Determine
whether
            target has shared memory and disable some scalar
pointer/allocatable
            checks if not as firstprivate does not work.

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

* [Bug fortran/90742] OpenACC/OpenMP target offloading: Fortran 'allocatable' scalars in 'firstprivate' clauses
       [not found] <bug-90742-4@http.gcc.gnu.org/bugzilla/>
  2021-06-09  8:39 ` [Bug fortran/90742] OpenACC/OpenMP target offloading: Fortran 'allocatable' scalars in 'firstprivate' clauses burnus at gcc dot gnu.org
  2021-06-29 13:50 ` cvs-commit at gcc dot gnu.org
@ 2022-05-23 10:09 ` burnus at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2022-05-23 10:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90742

--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> ---
On OpenMP side, firstprivate() (on 'target') should work fine for scalars to my
knowledge, including defaultmap. For arrays, it works since PR104949.
Except: Not working is firstprivate() with deep firstprivate (allocatable
components etc.)

Regarding OpenACC: I have not checked what's the status for those.

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

end of thread, other threads:[~2022-05-23 10:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-90742-4@http.gcc.gnu.org/bugzilla/>
2021-06-09  8:39 ` [Bug fortran/90742] OpenACC/OpenMP target offloading: Fortran 'allocatable' scalars in 'firstprivate' clauses burnus at gcc dot gnu.org
2021-06-29 13:50 ` cvs-commit at gcc dot gnu.org
2022-05-23 10:09 ` 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).