https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99828
--- Comment #10 from Martin Liška <marxin at gcc dot gnu.org> --- > ?? 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=nolto-rel which will bypass whole program optimization 3.i: In function ‘LZ4_decompress_safe_forceExtDict’: 1.i:2:1: error: inlining failed in call to ‘always_inline’ ‘memcpy’: --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