public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgomp/59546] New: wrong behavior with reduction
@ 2013-12-18 12:37 valeryweber at hotmail dot com
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
0 siblings, 2 replies; 3+ messages in thread
From: valeryweber at hotmail dot com @ 2013-12-18 12:37 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-08 14:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-18 12:37 [Bug libgomp/59546] New: wrong behavior with reduction valeryweber at hotmail dot com
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
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).