From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7B5F33858406; Sun, 21 Nov 2021 20:07:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7B5F33858406 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/101180] [12 Regression] Rejected code since r12-299-ga0fdff3cf33f7284 Date: Sun, 21 Nov 2021 20:07:04 +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: 12.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 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: Sun, 21 Nov 2021 20:07:04 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101180 --- Comment #4 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:364539710f828851b9fac51c39033cd09aa620de commit r12-5441-g364539710f828851b9fac51c39033cd09aa620de Author: Jakub Jelinek Date: Sun Nov 21 21:06:23 2021 +0100 i386: Fix up handling of target attribute [PR101180] As shown in the testcase below, if a function has multiple target attributes (rather than a single one with one or more arguments) or if a function gets one target attribute on one declaration and another one on another declaration, on x86 their effect is not combined into DECL_FUNCTION_SPECIFIC_TARGET, but instead only the last processed targ= et attribute wins. aarch64 handles this right, the following patch follows what it does, i.e. only start with target_option_default_node if DECL_FUNCTION_SPECIFIC_TARGET is previously NULL (i.e. the first target attribute being processed on a function) and otherwise start from the previous DECL_FUNCTION_SPECIFIC_TARGET. 2021-11-21 Jakub Jelinek PR c++/101180 * config/i386/i386-options.c (ix86_valid_target_attribute_p): If fndecl already has DECL_FUNCTION_SPECIFIC_TARGET, use that as b= ase instead of target_option_default_node. * gcc.target/i386/pr101180.c: New test.=