public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "valeryweber at hotmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libgomp/59546] New: wrong behavior with reduction Date: Wed, 18 Dec 2013 12:37:00 -0000 [thread overview] Message-ID: <bug-59546-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59546 Bug ID: 59546 Summary: wrong behavior with reduction Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgomp Assignee: unassigned at gcc dot gnu.org Reporter: valeryweber at hotmail dot com CC: jakub at gcc dot gnu.org hi all the following code is producing strange result (removing the writes works fine). is it a bug? v gfortran-trunk --version GNU Fortran (GCC) 4.9.0 20131119 (experimental) Copyright (C) 2013 Free Software Foundation, Inc. GNU Fortran comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of GNU Fortran under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING [vwe@triest semd]$ cat gcc_reduction.f90 program test use omp_lib implicit none integer :: i !$omp parallel reduction(+:i) i=1 !$omp master write(*,*) 'first write' write(*,*) 'second write' !$omp end master !$omp end parallel if(i.ne.omp_get_max_threads()) then write(*,*) i stop 'err1' endif end program test [vwe@triest semd]$ export OMP_NUM_THREADS=1; gfortran-trunk -fopenmp gcc_reduction.f90 ; ./a.out first write second write 49 STOP err1
next reply other threads:[~2013-12-18 12:37 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-12-18 12:37 valeryweber at hotmail dot com [this message] 2013-12-18 12:45 ` [Bug libgomp/59546] " jakub at gcc dot gnu.org 2021-06-08 14:15 ` rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-59546-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).