From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A3588388E809; Thu, 6 May 2021 15:59:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A3588388E809 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/99928] [OpenMP] reduction variable in combined target construct wrongly mapped as firstprivate Date: Thu, 06 May 2021 15:59:50 +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: 11.0 X-Bugzilla-Keywords: openmp, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: attachments.created 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 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: Thu, 06 May 2021 15:59:50 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99928 --- Comment #3 from Jakub Jelinek --- Created attachment 50768 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D50768&action=3Dedit pr99928.tar.xz I think we should start by checking what we are missing from the handling of the harder clauses on combined/composite constructs against the 5.0 2.14 section. By the harder clauses I mean firstprivate, lastprivate, firstprivate+lastprivate, linear (explicit non-IV, explicit IV, implicit IV= ), reduction and in_reduction. I've tried to construct testcases attached here that hopefully handle all possible cases and now the gimple dump should be checked against the rules. The rules are known to be buggy in 5.0, but let's assume that reduction even without inscan is tofrom on target combined with it as it was meant (and th= en mistakenly broken, fixed in 5.1). I've noticed we don't handle in_reduction clause on target construct.=