From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0ECF9384DEF3; Thu, 14 Mar 2024 16:20:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0ECF9384DEF3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710433223; bh=LcSUP2r+V69sI8KSGDSAXyO+IQsYPOSkXMycnCtH0Xk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OlPscswtxBcKQodTKqYLCMpRWi6urQumxITUTcIdGOcBldJ96fIVmXAnqh78O64Ai UZpbrbFhZpNKWyvwUuutJxPL21tiyvxqHCfnu8oMgEkHmaXs+OR1efvnne4W58MNEV 1lu+w0JGjdjGW56zuoOWM9lp9DfL1hexEXezvIdI= From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/113907] [11/12/13/14 regression] ICU miscompiled since on x86 since r14-5109-ga291237b628f41 Date: Thu, 14 Mar 2024 16:20:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: hubicka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created 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 #58 from Jan Hubicka --- Created attachment 57702 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D57702&action=3Dedit Compare value ranges in jump functions This patch implements the jump function compare, however it is not good eno= ugh. Here is another wrong code: jh@ryzen3:~/gcc/build/stage1-gcc> cat a.c #include #include __attribute__((used)) int val,val2 =3D 1; struct foo {int a;}; struct foo **ptr; __attribute__ ((noipa)) int test2 (void *a) {=20 ptr =3D (struct foo **)a; } int test3 (void *a); int test(void) {=20 struct foo *fp; test2 ((void *)&fp); fp =3D NULL; (*ptr)++; test3 ((void *)&fp); } int testb (void); int main() {=20 for (int i =3D 0; i < val2; i++) if (val) testb (); else test(); } jh@ryzen3:~/gcc/build/stage1-gcc> cat b.c #include struct bar {int a;}; struct foo {int a;}; struct barp {struct bar *f; struct bar *g;}; extern struct foo **ptr; int test2 (void *); int test3 (void *); int testb(void) { struct bar *fp; test2 ((void *)&fp); fp =3D NULL; (*ptr)++; test3 ((void *)&fp); } jh@ryzen3:~/gcc/build/stage1-gcc> cat c.c #include __attribute__ ((noinline)) int test3 (void *a) { if (!*(void **)a) abort (); return 0; } jh@ryzen3:~/gcc/build/stage1-gcc> ./xgcc -B ./ -O3 a.c b.c -flto -c ; ./xgc= c -B ./ -O3 c.c -flto -fno-strict-aliasing -c ; ./xgcc -B ./ b.o a.o c.o ; ./a.= out Aborted (core dumped) jh@ryzen3:~/gcc/build/stage1-gcc> ./xgcc -B ./ -O3 a.c b.c -flto -c ; ./xgc= c -B ./ -O3 c.c -flto -fno-strict-aliasing -c ; ./xgcc -B ./ b.o a.o c.o --disable-ipa-icf ; ./a.out=20 lto1: note: disable pass ipa-icf for functions in the range of [0, 42949672= 95] lto1: note: disable pass ipa-icf for functions in the range of [0, 42949672= 95]=