[Issue 9163] std.parallelism broken with extensive optimizations (gdc)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Dec 16 02:56:07 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=9163



--- Comment #4 from David Nadlinger <code at klickverbot.at> 2012-12-16 02:56:04 PST ---
(In reply to comment #2)
> The read/writes just need to be safeguarded by synchronized to prevent any
> memoization occuring.

Okay, I admit that this is all just hand-waiving until we finally get at »D
memory model« spec together (maybe we should just start a wiki page to collect
ideas), but:

Why would you think that scalar promotion for the (inlined) function call is
legal in the first place? To be able to do that, you would have to prove that
the call to atomicReadUbyte/atomicLoad depends only on thread local state and
has no global side effects, and I can't see how atomic operations would fit any
sensible definition of that terms.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list