I've checked in this patch for PR 57182. -Sandra
2018-11-26 Sandra Loosemore <san...@codesourcery.com>
PR c/57182 gcc/ * doc/invoke.texi (Optimize Options): Document that -freorder-functions also uses "hot" and "cold" attributes.
Index: gcc/doc/invoke.texi =================================================================== --- gcc/doc/invoke.texi (revision 266472) +++ gcc/doc/invoke.texi (working copy) @@ -9796,8 +9796,9 @@ subsections @code{.text.hot} for most fr the linker so object file format must support named sections and linker must place them in a reasonable way. -Also profile feedback must be available to make this option effective. See -@option{-fprofile-arcs} for details. +This option isn't effective unless you either provide profile feedback +(see @option{-fprofile-arcs} for details) or manually annotate functions with +@code{hot} or @code{cold} attributes (@pxref{Common Function Attributes}). Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.