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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Dec 16 08:15:04 PST 2012


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



--- Comment #8 from Iain Buclaw <ibuclaw at ubuntu.com> 2012-12-16 08:15:03 PST ---
(In reply to comment #6)
> > Could be something trivial such as the backend somehow deduces that the
> > function (atomicLoad) is pure.
> 
> I don't know anything about the gcc backend, but it seems to me that it would
> have to deduce that to be able to move a call out of the loop without breaking
> code. I also noticed that adding an empty gcc asm block to atomicLoad results
> in correct code being generated for workLoop. I guess that supports that
> theory.

Probably because asm statements are volatile, and is a black hole that the
compiler does not touch.

-- 
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