Re: gcc inlining heuristics was Re: [PATCH -v7][RFC]: mutex: implement adaptive spinning

Linus Torvalds
2009-01-12T20:11:07Z

On Mon, 12 Jan 2009, Bernd Schmidt wrote:
>
> However, if the compiler chooses to put them into the same stack
> location, the RTL-based alias analysis will happily conclude (based on
> the differing types) that the reads from A and the writes to B can't
> possibly conflict, and some passes may end up reordering them. End
> result: overlapping lifetimes and overlapping stack slots. Oops.

Yes, I came to the same conclusion.

Of course, I knew a-priori that the real bug was using type-based alais
analysis to make (statically visible) aliasing decisions, but I realize
that there are people who never understood things like that. Sadly, some
of them worked on gcc.

Linus