> gcc translates this to something like this: > /* %r4 is &pty_driver */ > ldo 28(%r4),%r23 > ldi 28,%r21 > ldw,ma 4(%r22),%r20 > ldw,ma 4(%r22),%r19 > stw,ma %r20,4(%r23) > addib,>= -8,%r21,.-12 > stw,ma %r19,4(%r23) > /* ... */ > stw %r0,28(%r4) > stw %r0,32(%r4) > stw %r10,36(%r4) > stw %r0,40(%r4) > > When optimizations are turned on, gcc reschedules some of those final > stw insns above the structure copy loop. When the structure copy > happens, the values get overwritten. ick. > > this was kind of interesting to debug :) but i have no idea how to fix > it. Dave? :)
I don't either at the moment. It's memory aliasing problem. It's most likely not a problem in the backend. Can you strip the above down to a simple testcase and file a GCC PR? I will bump it to high-priority as it is a regression. -- J. David Anglin [EMAIL PROTECTED] National Research Council of Canada (613) 990-0752 (FAX: 952-6605)

