Optimization is removing wanted branches

Joern Rennecke amylaar@redhat.com
Fri Aug 31 03:24:00 GMT 2001


> The other day one of us noticed that the following code is emitted from cc1
> without a branch when optimization is turned on.  Is there a way to use
> optimization (-O1, -O2, -O3) and have the assembly branch instuction in the
> ouput?

Yes, you could insert an asm volatile (""); .



More information about the Gcc mailing list