[Gc] Gc segfault with gcc-3.4 and Gc segfault under valgrind
Eric.Deplagne at wanadoo.fr
Thu Nov 16 07:26:19 PST 2006
On Thu, 16 Nov 2006 15:04:50 +0000, Andrew Haley wrote:
> Eric Deplagne writes:
> > On Thu, 16 Nov 2006 13:29:51 +0000, Andrew Haley wrote:
> > >
> > > Yes, you did get the meaning of volatile wrong. volatile stops it
> > > from being moved or from being executed more than once. Your're
> > > telling gcc that this asm depends on something that gcc doesn't know
> > > about. For example, if you have an asm that reads a counter, you have
> > > to make that asm volatile or gcc will assume that its result does not
> > > change.
> > Like it could just move it outside of the loop.
> > Means "asm volatile" is the thing to do in my case,
> > if I wanted to keep the asm()...
> > Still funny only gcc-3.4 did reorder the thing...
> It's true that optimizers do odd things when presented with incorrect
> code, and do different odd things in different versions. However, it
> is rarely productive or interesting to try to figure out why.
> If you lie to gcc, or even if you fail to tell gcc the whole truth, it
> will bite you.
Just that to make things more complex, in fact it *can* bite you,
and since it does not always do, you just don't know *when* it will do.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://napali.hpl.hp.com/pipermail/gc/attachments/20061116/51b60c0b/attachment.pgp
More information about the Gc