Scheduler moves load in front of store on powerpc-linux, 3.0 and mainline
Geoff Keating
geoffk@geoffk.org
Tue Apr 10 18:28:00 GMT 2001
Franz Sirl <Franz.Sirl-kernel@lauterbach.com> writes:
> the attached testcase breaks KDE2 on powerpc-linux-gnu and I consider it
> probably the last gcc-3.0 showstopper bug I know of.
KDE2 appears to be broken. This code:
*((unsigned char **) &p->clients)
refers to p->clients as an 'unsigned char *'.
But this code:
p->clients = nwindup(windows, count);
refers to p->clients as a 'Window *', which has underlying type
'unsigned long *'.
This is the usual type violation when accessing memory that causes
undefined behaviour under ISO C. I suppose you could try
-fno-strict-aliasing, but it'd be better to fix the code.
--
- Geoffrey Keating <geoffk@geoffk.org>
More information about the Gcc-bugs
mailing list