From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B05BD3858430; Tue, 12 Oct 2021 12:03:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B05BD3858430 From: "han.wu@compiler-dev.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/102698] omp atomic capture Abnormal results after running multiple times Date: Tue, 12 Oct 2021 12:03:40 +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 X-Bugzilla-Severity: normal X-Bugzilla-Who: han.wu@compiler-dev.com 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 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: Tue, 12 Oct 2021 12:03:40 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102698 --- Comment #4 from han.wu --- Thank you very much for your prompt reply=EF=BC=81 @Jakub Jelinek One thing I don't quite understand is that if we modify the test case as suggested as the extra note, then the value of temp_v may vary at each execution, then what is the occasion to use an atomic capture structure wit= h 2 statements? Could you please give me an example of a practical usage of it?=