On Fri, Jan 20, 2006 at 06:39:21PM +0100, Steven Bosscher wrote: > FWIW, I don't believe this is a "fix", but rather a solid work-around > for the problem. I'm still trusting rth's superior compiler brain and > GCC knowledge to ultimately be ingredients in a real fix ;-)
I don't think it's quite solid for a workaround. And, unfortunately, I can't think of any "good" solution to the problem. The only only way to prevent some of the potential problems is to prevent moving memory operations across block boundaries, which would be a real joy for our optimizers. In some cases I'm sure we could see no ill effects by adding memory barriers strategically, and in others I'm sure we'd kill performance. r~