https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65950

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|function becomes unlikely   |exit in main is causing the
                   |with -fwhole-program        |path to it to become
                   |                            |unlikely.

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Ok, the problem is the exit function call is causing the path to it becoming
unlikely.

That is change the exit to return and you get the optimization back.

Basically an exit with a argument equal to 0 should not be considered as
unlikely but a standard exit from the program.

Reply via email to