[OT] ppc64 serialization problem

Ivan Warren ivan at vmfacility.fr
Thu Mar 30 05:42:57 EST 2006


Olaf Hering wrote:
>  On Wed, Mar 29, Greg Smith wrote:
>
>   
>> So it is clear between .A and .B -> value of b was read then written. If
>> anything happens between .A and .B to ->b, then it is lost.
>>     
>
> Even gcc4.1 does it that way with -O0
Yeah.. Noticed that..gcc 3.3.3 and gcc 4.0.3 also do this

Even declaring the field volatile has no effect..

Question :
Is this *NORMAL* behavior ? I discussed this with some C folks and they 
seem to think (at least some of them) that it's broken per standards.. 
(volatile fields should be only read/written IFF read/written explicitly 
- pretty much what section 6.3.7 of the C std says).

Anyway I can produce perfectly valid sample code (to my understanding 
anyway) that produces incorrect result.. YUCK !

This is also possibly a problem with the powerpc64 back end of gcc..

Anyway.. It's OT.. Sorry to have bothered you guys ! (And thanks Greg 
for pointing me here).

--Ivan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3216 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20060329/e1173eef/attachment.bin>


More information about the Linuxppc-dev mailing list