public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libgomp/59194] tsan detects race for real variables in an OMP reduction clause Date: Wed, 20 Nov 2013 13:51:00 -0000 [thread overview] Message-ID: <bug-59194-4-vREsqlkRdY@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-59194-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59194 --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Because CPUs obviously don't have floating point atomic instructions, what the compiler does is just load it as an integer, view convert to floating point, perform arithmetics, view convert result back to integer, and compare and swap (if unsuccessful loop). I bet tsan complains because the load is not atomic, but does it really matter? If we read garbage there, compare and swap will fail and next time we'll have hopefully correct value already from what compare and swap said was the previous value.
next prev parent reply other threads:[~2013-11-20 13:51 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-11-19 17:51 [Bug libgomp/59194] New: " Joost.VandeVondele at mat dot ethz.ch 2013-11-19 18:25 ` [Bug libgomp/59194] " pinskia at gcc dot gnu.org 2013-11-19 18:46 ` Joost.VandeVondele at mat dot ethz.ch 2013-11-20 13:43 ` Joost.VandeVondele at mat dot ethz.ch 2013-11-20 13:51 ` jakub at gcc dot gnu.org [this message] 2013-11-20 17:26 ` Joost.VandeVondele at mat dot ethz.ch 2013-11-20 17:54 ` Joost.VandeVondele at mat dot ethz.ch 2013-11-20 17:59 ` jakub at gcc dot gnu.org 2013-11-20 18:12 ` Joost.VandeVondele at mat dot ethz.ch 2013-11-21 12:34 ` dvyukov at google dot com 2014-01-09 16:12 ` Joost.VandeVondele at mat dot ethz.ch 2014-01-13 7:57 ` jakub at gcc dot gnu.org 2014-01-13 10:54 ` Joost.VandeVondele at mat dot ethz.ch
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-59194-4-vREsqlkRdY@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).