From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C72D3385735F; Fri, 28 Oct 2022 08:31:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C72D3385735F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666945903; bh=ZlUs30Sqj9/maST8mu1QDuhmk913xZnGnqAYjIwg8WE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=HCGm9tpOvCrEyrO+nD9DFAfSvZ2iDJAmQjr3J8I6LZ0+tVmzOHs8+A0Pxhj3SwatU 77gi62JeOCJmrBlPnIDoNen1B1O6cJe5bL+Zzd7LkC4/0I4mRehKNCvtJUhHtr3j36 mNMbFoU3u6M/WGzh9HGmgmPnlAhr1hUP9faO9N2o= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/90115] OpenACC: predetermined private levels for variables declared in blocks Date: Fri, 28 Oct 2022 08:31:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 9.0 X-Bugzilla-Keywords: openacc, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW 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: Message-ID: In-Reply-To: References: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D90115 --- Comment #19 from CVS Commits --- The releases/gcc-12 branch has been updated by Thomas Schwinge : https://gcc.gnu.org/g:9b116c51a451995f1bae8fdac0748fcf3f06aafe commit r12-8874-g9b116c51a451995f1bae8fdac0748fcf3f06aafe Author: Julian Brown Date: Wed Oct 12 20:44:57 2022 +0000 OpenACC: Don't gang-privatize artificial variables [PR90115] This patch prevents compiler-generated artificial variables from being treated as privatization candidates for OpenACC. The rationale is that e.g. "gang-private" variables actually must be shared by each worker and vector spawned within a particular gang, but that sharing is not necessary for any compiler-generated variable (at least at present, but no such need is anticipated either). Variables on the stack (and machine registers) are already private per-"thread" (gang, worker and/or vector), and that's fine for artificial variables. We're restricting this to blocks, as we still need to understand what it means for a 'DECL_ARTIFICIAL' to appear in a 'private' clause. Several tests need their scan output patterns adjusted to compensate. 2022-10-14 Julian Brown PR middle-end/90115 gcc/ * omp-low.cc (oacc_privatization_candidate_p): Artificial vars = are not privatization candidates. libgomp/ * testsuite/libgomp.oacc-fortran/declare-1.f90: Adjust scan out= put. * testsuite/libgomp.oacc-fortran/host_data-5.F90: Likewise. * testsuite/libgomp.oacc-fortran/if-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/print-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/privatized-ref-2.f90: Likewise. Co-authored-by: Thomas Schwinge (cherry picked from commit 11e811d8e2f63667f60f73731bb934273f5882b8)=