This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/65950] exit in main is causing the path to it to become unlikely.


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]