From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8A0D33858CDA; Sun, 26 Mar 2023 18:16:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8A0D33858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679854560; bh=N1tKQCyBElDu78gp7yDG5lE8z++RBAPrh6RhNcr6rng=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SLFrTJIw62KdNNlo6GqLWppzmcybo4es5Yaki1mxmvnlrv0NK4r3SsYkra/s4cfaC weEXjrEed7LnVAVeF8/eCQ1U+1oIX3iHOoqwVNgADnsOgk46PqLvWinpiixLuw0/Ns QRXNujKexK8eIEA72x37S7K+2v/in0XYL834P2nc= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/105685] [10/11/12/13 Regression] Bogus `-Wsuggest-attribute=cold` on function already marked as `__attribute__((cold))` Date: Sun, 26 Mar 2023 18:15:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 12.1.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105685 --- Comment #5 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:7eca91d4781bb3df941f25c30b971dac66ba1b3d commit r13-6865-g7eca91d4781bb3df941f25c30b971dac66ba1b3d Author: Jakub Jelinek Date: Sun Mar 26 20:15:05 2023 +0200 predict: Don't emit -Wsuggest-attribute=3Dcold warning for functions wh= ich already have that attribute [PR105685] 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=3Dcold warning despite it having that attribute already. The following patch avoids that. 2023-03-26 Jakub Jelinek 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.=