From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5F3E23938396; Mon, 12 Apr 2021 15:37:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F3E23938396 From: "thiago at kde dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/100005] undefined reference to `_rdrand64_step' Date: Mon, 12 Apr 2021 15:37:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: thiago at kde dot 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: 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: Mon, 12 Apr 2021 15:37:26 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100005 --- Comment #14 from Thiago Macieira --- (In reply to Jakub Jelinek from comment #13) > The same like in C. > I.e. > extern inline __attribute__((gnu_inline, always_inline, artificial)) int = foo > (int x) { return x; } > // The above is typically from some header > int foo (int x) { return x; } > // The above is the out of line function definition Thanks, Jakub. At first sight that's not valid C++, but then since it's an extension it doesn't have to be. ICC even accepts the same syntax and gener= ates the same non-weak symbol. Any way to do that without repeating the body, thus potentially causing an = ODR violation? I'm not likely to use this feature, but asking for a rainy day. https://gcc.godbolt.org/z/96qW9ExcG=