This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Scheduler moves load in front of store on powerpc-linux, 3.0 and mainline
- To: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Subject: Re: Scheduler moves load in front of store on powerpc-linux, 3.0 and mainline
- From: Geoff Keating <geoffk at geoffk dot org>
- Date: Tue, 10 Apr 2001 18:27:57 -0700
- CC: gcc-bugs at gcc dot gnu dot org
- References: <01041102174602.01204@enzo.bigblue.local>
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>