From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 545F83854809; Wed, 31 Mar 2021 11:56:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 545F83854809 From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBsdG8vOTk4MjhdIGlubGluaW5nIGZhaWxlZCBpbiBjYWxs?= =?UTF-8?B?IHRvIOKAmGFsd2F5c19pbmxpbmXigJkg4oCYbWVtY3B54oCZOiAtLXBhcmFt?= =?UTF-8?B?IG1heC1pbmxpbmUtaW5zbnMtYXV0byBsaW1pdCByZWFjaGVk?= Date: Wed, 31 Mar 2021 11:56:24 +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: marxin at gcc dot gnu.org 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 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: Wed, 31 Mar 2021 11:56:24 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99828 --- Comment #10 from Martin Li=C5=A1ka --- > ?? obviously bad reduction. Fixed with: $ cat 3.i enum { false, true } * __memcpy(); _Bool kasan_check_range(); void *memcpy(void *dest, void *src, long len) { if (kasan_check_range(len, false, 0) || kasan_check_range(len, true, 0)) return __memcpy(dest, src, len); } char LZ4_decompress_safe_forceExtDict_lowPrefix, LZ4_decompress_safe_forceExtDict_op; long LZ4_decompress_safe_forceExtDict_restSize; void LZ4_decompress_safe_forceExtDict() { __builtin_memcpy(&LZ4_decompress_safe_forceExtDict_op, &LZ4_decompress_safe_forceExtDict_lowPrefix, LZ4_decompress_safe_forceExtDict_restSize); } $ gcc -r [123].o /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: warning: incremental linking of LTO and non-LTO objects; using -flinker-output=3Dnolto-rel which will bypass whole program optimization 3.i: In function =E2=80=98LZ4_decompress_safe_forceExtDict=E2=80=99: 1.i:2:1: error: inlining failed in call to =E2=80=98always_inline=E2=80=99 = =E2=80=98memcpy=E2=80=99: --param max-inline-insns-auto limit reached 2 | memcpy(); | ^ 3.i:12:3: note: called from here 12 | __builtin_memcpy(&LZ4_decompress_safe_forceExtDict_op, | ^ lto-wrapper: fatal error: gcc returned 1 exit status compilation terminated. /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: error: lto-wrapper failed=