Does gcc automatically lower optimization level for very large routines?

Jonathan Wakely jwakely.gcc@gmail.com
Fri Dec 20 16:22:00 GMT 2019


On Fri, 20 Dec 2019 at 16:05, Qing Zhao wrote:
>
> Thanks a lot for all these help.
>
> So, currently, if GCC compilation aborts due to this reason, what’s the best way for the user to resolve it?
> I added “#pragma GCC optimize (“O1”) to the large routine in order to workaround this issue.
> Is there other better way to do it?

Make your functions smaller, or get more RAM.

> Is GCC planning to resolve such issue better in the future?

Nobody has stated any such plans, so you can assume there are no such plans.



More information about the Gcc mailing list