public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/62131] New: Openmp Regression 4.9.1 : Subobject of an allocatable array not allowed in OMP ATOMIC
@ 2014-08-14  8:18 vladimir.fuka at gmail dot com
  2014-08-14 13:40 ` [Bug fortran/62131] [4.9.1 Regression] OpenMP: " burnus at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: vladimir.fuka at gmail dot com @ 2014-08-14  8:18 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 62131
           Summary: Openmp Regression 4.9.1 : Subobject of an allocatable
                    array not allowed in OMP ATOMIC
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vladimir.fuka at gmail dot com

layzrc raised this problem on comp.lang.fortran
https://groups.google.com/forum/#!topic/comp.lang.fortran/lVzeHW_X1aw

module storage
  integer,allocatable :: nerrs(:,:)
end module

program atomic
  use storage
    allocate(nerrs(10,10))
!$omp parallel do
    do k=1,10
      call uperrs(k,1)
    enddo
!$omp end parallel do
  stop
contains
  subroutine uperrs(i,io)
  integer,intent(in) :: i,io
!$omp atomic
    nerrs(i,io)=nerrs(i,io)+1
  end subroutine
end

>gfortran -fopenmp atomic.f90
atomic.f90:18.29:

    nerrs(i,io)=nerrs(i,io)+1
                             1
Error: !$OMP ATOMIC with ALLOCATABLE variable at (1)



I believe this is a  wrong and causes a bad regression, because `nerrs(i,io)`
is not an allocatable variable. I believe the section 2.12.6 of OpenMP 4
concerns situations when the whole variable being updated or assigned is
allocatable (e.g. allocatable scalars) and it causes possible re-allocation.


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

end of thread, other threads:[~2014-10-02 12:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-14  8:18 [Bug fortran/62131] New: Openmp Regression 4.9.1 : Subobject of an allocatable array not allowed in OMP ATOMIC vladimir.fuka at gmail dot com
2014-08-14 13:40 ` [Bug fortran/62131] [4.9.1 Regression] OpenMP: " burnus at gcc dot gnu.org
2014-08-14 16:24 ` [Bug fortran/62131] [4.9/5 " jakub at gcc dot gnu.org
2014-08-15 10:23 ` jakub at gcc dot gnu.org
2014-08-15 10:24 ` jakub at gcc dot gnu.org
2014-10-02 12:55 ` jakub 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).