This is not really a bug, but I'm entering it here in case anybody
should think it is.
If, in inline asm, you use a local variable as an operand with the "g"
constraint inside a push/pop pair when compiling with `-fomit-frame-pointer',
you will get bad code generated. An example of this would be:
void f(unsigned sel) {
asm("pushl %%es;
movl %0, %%es;
/* code */
popl %%es;" : : "g" (selector));
}
This is because GCC generates the addresses for arguments and local
variables relative to %esp when -fomit-frame-pointer. It doesn't know
that you've changed %esp with your `push', so the address comes out wrong
and life is generally unpleasant.
I reported this to the GCC maintainers, and the consensus is that there is
no good way for GCC to avoid this.