Rainer Tammer <pgsql(at)spg(dot)schulergroup(dot)com> writes:
> it looks like these failures are caused by compiler optimizations -O2.
> Without optimization the random failures do not show up.
Yeah, that looked suspiciously compiler-bug-like to me. It's conceivable
that it's not a compiler bug but something we're doing wherein the results
are undefined per C standard ... but since we've not seen similar reports
on other platforms, and since the misbehavior goes away again in TL3, I'm
betting it's the compiler's fault.
regards, tom lane