From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 28D1B3858C78; Thu, 4 May 2023 16:41:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 28D1B3858C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683218476; bh=bvliqWSyT+xP/kBJjl9gRfcXQCd5KsultAUl/fE54cs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LK8T6ZRbTQN5GO7IXz6Asy6LB0W7Rsy3UgzGK9Ikpwq87PMs/Cm6ocPGzRW/nBda2 bLe66A68ZUF639eAvWEwPToKa4dVO69uy8zAA4OI/sK+mv3qJHof6ScV8zxE5hqQyE JKNnor0+5JlASPsyp54XCpMEUGax2n8i6aSpw8ao= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/109701] I have a MWE where an omp reduction breaks if I add the option for GPU offloading (even if it isn't used). Date: Thu, 04 May 2023 16:41:16 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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=3D109701 --- Comment #7 from Jakub Jelinek --- That is not that surprising. As mentioned in the linked in PR99928, that behavior is there only in OpenMP 5.0 and wasn't like that in OpenMP 4.5 and earlier; in OpenMP 4.5 you really need separate target (or target teams) with explicit map clause = and then distribute ... with reduction. And this part of OpenMP 5.0 was only implemented in GCC starting with GCC 12, older versions supported the 4.5 behavior.=