From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C5FF63858017; Tue, 13 Feb 2024 16:30:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C5FF63858017 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707841826; bh=dd3R6Qte0KGMHHpDCdjFlKitBf9iPmJc1V1o4QYECq0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wF68GwhkomKLFl0/78xZHrAeEUSDW+WZULujk/1D10Aet9m9ycG8E7v1lQYqYf2L3 Qo5mY5nZYqoCpKFx5ssPnNBIcxkffyY237FqduMZrEXprVF+rGl6XL72hk6GkshuPL 5ER+yoNSOpfLsLYjyTp6Fs4Kr5i6CX4qd1C5rfIg= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/113907] [14 regression] ICU miscompiled since on x86 since r14-5109-ga291237b628f41 Date: Tue, 13 Feb 2024 16:30:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-code 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: 14.0 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=3D113907 --- Comment #24 from Jakub Jelinek --- static inline int foo (int len, void *indata, void *outdata) { if (len < 0 || (len & 7) !=3D 0) return 0; if (len !=3D 0 && indata !=3D outdata) __builtin_memcpy (outdata, indata, len); return len; } static inline int bar (int len, void *indata, void *outdata) { if (len < 0 || (len & 1) !=3D 0) return 0; if (len !=3D 0 && indata !=3D outdata) __builtin_memcpy (outdata, indata, len); return len; } int (*volatile p1) (int, void *, void *) =3D foo; int (*volatile p2) (int, void *, void *) =3D bar; __attribute__((noipa)) int baz (int len, void *indata, void *outdata) { if ((len & 6) !=3D 0) bar (len, indata, outdata); else foo (len, indata, outdata); } int main () { char buf[13] =3D "abcdefghijkl"; p2 (6, buf, buf + 6); if (__builtin_strcmp (buf, "abcdefabcdef")) __builtin_abort (); } Reproduces the wrong range in bar, but still doesn't crash nor abort. So I probably need some different size of the copying.=