lkml.org 
[lkml]   [1998]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: gcc-2.8.0 miscompiles kernel (Was: gcc-2.8 out...)
From
Date
alan@lxorguk.ukuu.org.uk (Alan Cox) writes:

> > Hmmmmm, are you _sure_ that's a bug ? The cast says that the pointed
> > value is volatile, not the pointer itself. So the compiler can, I
> > think, still legally assume that the memory zone assigned through the
> > pointer will be destroyed after the return.
>
> Oh bog.. I do indeed have the volabloodytile keyword in the wrong place
> yes. Try it as he suggested and lets see
>
> > *((u32 * volatile)&eflags)=val; should make it behave though. I'm not
> > really sure. That's quite a tricky part of the standard.

I just tested the (u32 * volatile) version. It still generates incorrect
code with 2.8.0. It seems that gcc 2.8.0's doesn't check properly for
volatile in the ADDRESSOF optimization.


-Andi

\
 
 \ /
  Last update: 2005-03-22 13:41    [from the cache]
©2003-2011 Jasper Spaans