From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D3C4E386F82E; Wed, 22 Apr 2020 12:54:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D3C4E386F82E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587560041; bh=IuG3cur0YNo8eQHAoWKF731gciablqW6AdNTMfddPtA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=bGxudZr424FkD3jBOgbRfDT/kYpo3T/PulmEoJ5qpNhYNS+P3LrOPkUmiWfs3Q201 U+YLI7xnphLfEPtOB9HbiwAdBZvzxVaSBU/+9pr3RYKyYlahMAjh7nX6lKtLxKWP3G Cip2HtB0kOS+dlMbI8cfTdHGO2JAAcjgDaMZe45M= From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBmb3J0cmFuLzk0NjkwXSBbT3Blbk1QXSBvbXAgLi4uIGRp?= =?UTF-8?B?c3RyaWJ1dGUg4oCTIGxhc3Rwcml2YXRlIG5vdCBwZXJtaXR0ZWQgYW5kIG1v?= =?UTF-8?B?cmUgaXNzdWVz?= Date: Wed, 22 Apr 2020 12:54:01 +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: 10.0 X-Bugzilla-Keywords: openmp, rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus 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: 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: Wed, 22 Apr 2020 12:54:01 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94690 --- Comment #6 from Tobias Burnus --- (In reply to Tobias Burnus from comment #5) > The problem is (original dump): > #pragma omp distribute private(d) lastprivate(d) If one does not add the 'private(d)', it works: 'private(d)' is added by th= e ME only if 'lastprivate(d)' is not present. Namely, the following patch works =E2=80=93 but the question is, whence to = add a clause. (There is more such code.) --- a/gcc/fortran/trans-openmp.c +++ b/gcc/fortran/trans-openmp.c @@ -4312,7 +4312,5 @@ gfc_trans_omp_do (gfc_code *code, gfc_exec_op op, stmtblock_t *pblock, dovar_found =3D 2; - } - else - tmp =3D build_omp_clause (input_location, OMP_CLAUSE_PRIVATE); OMP_CLAUSE_DECL (tmp) =3D dovar_decl; omp_clauses =3D gfc_trans_add_clause (tmp, omp_clauses); + } }=