From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 21D6E39DC4E0; Fri, 9 Apr 2021 18:07:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 21D6E39DC4E0 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/100005] undefined reference to `_rdrand64_step' Date: Fri, 09 Apr 2021 18:07:10 +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: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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: 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: Fri, 09 Apr 2021 18:07:10 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100005 --- Comment #5 from Jakub Jelinek --- Neither always_inline nor artificial attribute means that you can't take addresses of those inlines, but 1) I don't think anything implies the intrinsics must be implemented as inl= ine functions, after all, gcc implements hundreds of intrinsics as preprocessor macros e.g. at -O0 2) as those intrinsics that are implemented as inline functions are impleme= nted by gcc as extern inline __attribute__((gnu_inline, artificial, always_inline)), they have the GNU extern inline semantics, i.e. the header provides definit= ions for inlining purposes and when it can't be inline, something different must supply the definitions somewhere else (either the user, or perhaps GCC in s= ome library; but GCC doesn't do that). Now, GCC could instead define them as static inline __attribute((artificial, always_inline)) and then one would get an out of line copy when taking their address, but it would duplicated in all the TUs that did this. Anyway, your assumption that intrinsics can be used the way you expect them= is just wrong.=