From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4CF9D38582B2; Fri, 23 Sep 2022 06:11:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4CF9D38582B2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663913479; bh=PUZKsW/UacIX830VpbVmoYBubIjG8H/J9eXJaFb8C5U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fVS8ZDHTTofpFYMmnSaXPZeYLS1dMKnroJUf/MMHBrwBCMDf5Aanby95l8+9RP0ns GeWiVPaYaf+foKh9p9EvOR/QGydUEIt+NC4dVPlQ5VykCu1geG2PStFLouEP7097y3 /QxgFECmaeGPolfb7Vu01K/M7RNrrVJaP4643B9I= From: "jirislaby at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBsdG8vOTk4MjhdIGlubGluaW5nIGZhaWxlZCBpbiBjYWxs?= =?UTF-8?B?IHRvIOKAmGFsd2F5c19pbmxpbmXigJkg4oCYbWVtY3B54oCZOiAtLXBhcmFt?= =?UTF-8?B?IG1heC1pbmxpbmUtaW5zbnMtYXV0byBsaW1pdCByZWFjaGVk?= Date: Fri, 23 Sep 2022 06:11:16 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: diagnostic, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: jirislaby at gmail dot com X-Bugzilla-Status: NEW 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99828 --- Comment #14 from Jiri Slaby --- (In reply to Richard Biener from comment #13) > The testcase still does not work on master or with 12.2, thus reconfirmed. Hmm: (In reply to Martin Li=C5=A1ka from comment #0) > Noticed by Andi Kleen in kernel, reduced to: >=20 > $ cat 1.i > __attribute__((__always_inline__)) void *memcpy(); > void *foo =3D memcpy; Provided I cannot reproduce on the current kernel, where exactly does this = come from? I see: arch/x86/include/asm/string_64.h: #define __HAVE_ARCH_MEMCPY 1 extern void *memcpy(void *to, const void *from, size_t len); extern void *__memcpy(void *to, const void *from, size_t len); =3D=3D=3D For KASAN also: #if defined(CONFIG_KASAN) && !defined(__SANITIZE_ADDRESS__) #undef memcpy #define memcpy(dst, src, len) __memcpy(dst, src, len) =3D=3D=3D arch/x86/lib/memcpy_64.S: SYM_FUNC_START(__memcpy) ... SYM_FUNC_END(__memcpy) ... SYM_FUNC_ALIAS_WEAK(memcpy, __memcpy) =3D=3D=3D $ nm ../lto/vmlinux|grep -wE '__memcpy|memcpy' ffffffff81dcf0b0 T __memcpy ffffffff81dcf0b0 W memcpy =3D=3D=3D arch/x86/lib/memcpy_32.c: __used __visible void *memcpy(void *to, const void *from, size_t n) { return __memcpy(to, from, n); }=