[Bug libgomp/59194] tsan detects race for real variables in an OMP reduction clause

Joost.VandeVondele at mat dot ethz.ch gcc-bugzilla@gcc.gnu.org
Wed Nov 20 13:43:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59194

--- Comment #3 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> ---
actually it seems more general an issue, the following:

SUBROUTINE S1(m)
  REAL  :: m
  !$OMP ATOMIC
  m=m+1.0
END

REAL :: m
m=0.0
!$OMP PARALLEL 
CALL S1(m)
!$OMP END PARALLEL
END

flags  race for the atomic update of m. Again, does work for integers but not
for reals.



More information about the Gcc-bugs mailing list