From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 234C53854830; Thu, 4 Mar 2021 04:49:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 234C53854830 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96078] [10 Regression] flatten attribute on constructor and destructor causes spurious warning Date: Thu, 04 Mar 2021 04:49:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.1.0 X-Bugzilla-Keywords: diagnostic, patch 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: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.3 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 04:49:24 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96078 --- Comment #6 from CVS Commits --- The releases/gcc-10 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:d455130553544ee838b5215e76ccad22304cde39 commit r10-9413-gd455130553544ee838b5215e76ccad22304cde39 Author: Jason Merrill Date: Thu Feb 11 22:01:19 2021 -0500 cgraph: flatten and same_body aliases [PR96078] The patch for PR92372 made us start warning about a flatten attribute o= n an alias. But in the case of C++ 'tor base/complete variants, the user di= dn't create the alias. If the alias target also has the attribute, the alias points to a flattened function, so we shouldn't warn. gcc/ChangeLog: PR c++/96078 * cgraphunit.c (process_function_and_variable_attributes): Don't warn about flatten on an alias if the target also has it. * cgraph.h (symtab_node::get_alias_target_tree): New. gcc/testsuite/ChangeLog: PR c++/96078 * g++.dg/ext/attr-flatten1.C: New test.=