Boost logo

Boost-Build :

Subject: Re: [Boost-build] Anyone know what's up with bug #7212?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2012-08-29 11:34:38


AMDG

On 08/29/2012 08:07 AM, Jurko Gospodnetić wrote:
>
> I'll try to rewrite the expand() function mentioned above to not use
> 'goto', as my guess would be that this is confusing the optimizer and
> causing it to optimize away the whole 'while ( --i >= 0 )' loop. Steven,
> as you're the original author of this code - have any hints on why it
> was written so and ideas on what could be done to avoid this issue?
>

I used a goto because it was easier than
writing an equivalent loop without goto.
I'm not sure why goto would confuse the
optimizer, though, since the compiler
generally reduces all control structures
to goto's before running any optimizers.

> Volodya, do you have any suggestions on how we can check whether this
> is the case? Some gdb magic perhaps? Or some gcc option to make it
> generate assembler code?

-S. You might also try disabling optimization
flags to identify which one is causing this.

> If you'll be around in a few hours, can you
> give me a ping on ICQ?
>

In Christ,
Steven Watanabe


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk