On 3/25/23 03:53, Jakub Jelinek via Gcc-patches wrote:
Hi! In the following testcase, we predict baz to have cold entry regardless of the user supplied attribute (as it call unconditionally a cold function), but still issue a -Wsuggest-attribute=cold warning despite it having that attribute already. The following patch avoids that. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2023-03-25 Jakub Jelinek <ja...@redhat.com> PR ipa/105685 * predict.cc (compute_function_frequency): Don't call warn_function_cold if function already has cold attribute. * c-c++-common/cold-2.c: New test.
OK jeff