Re: gcc-2.8.0 miscompiles kernel (Was: gcc-2.8 out...)

Andi Kleen (
20 Jan 1998 01:07:00 +0100 (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.