From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23008 invoked by alias); 14 Aug 2014 08:18:12 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 22989 invoked by uid 48); 14 Aug 2014 08:18:07 -0000 From: "vladimir.fuka at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/62131] New: Openmp Regression 4.9.1 : Subobject of an allocatable array not allowed in OMP ATOMIC Date: Thu, 14 Aug 2014 08:18:00 -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: 4.9.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vladimir.fuka at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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 bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-08/txt/msg00913.txt.bz2 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.