From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D29EE3858C66; Tue, 7 Mar 2023 06:14:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D29EE3858C66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678169655; bh=BW9G8zd5A93Dh9V57uZe3FjqoiSVgYkdvGolxAl95Nk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=emKdlTIam4iK3+MjeEpv7AXeS8Xl0F4BiKLzKRYl17JWzgTNKOB1TRKWt2UNXf7Fy TPbtr2avOVaJVt4TWHfCjwQJO7HoJuMNPPe2slWosyb3PBFwrREiUQtNtbtQ2wK9fm w1Rl0poW1XRG/R8mfmNSigqc9mZTVBlAHjeqFD1w= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109047] Harmonize __attribute__((target_clones)) requirement in function prototype Date: Tue, 07 Mar 2023 06:14:15 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution 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=3D109047 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Andrew Pinski --- Yes this is the correct behavior for this attribute. https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Common-Function-Attributes.ht= ml#index-target_005fclones-function-attribute "It also creates a resolver function (see the ifunc attribute above) that dynamically selects a clone suitable for current architecture. The resolver= is created only if there is a usage of a function with target_clones attribute. " This has been this way since target_clones support was added in GCC 6: r6-4443-g3b1661a9b93fe8 . Looks like it was not implemented the same way in clang, report it to them.=