From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9778B3858CDB; Thu, 30 Mar 2023 07:21:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9778B3858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680160899; bh=3jNKieAvp/1anDyx68ZnWBzfIJbFgatercj2OUYT7s4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cMEGnd6UTf4e/qH74Nv5ikk3JhVxLSPldV+g8oQQPcXw/kjNGhgK1QFAEXwj7f1L8 LInRPQiuEthtezUa/g/daVYbERWYz+c0r5CwXpWnO8+p4cL7wKunoaHPbEsIV0Y2Ne zVRH+BtAdb2BLfiV5TweIHHcsZCAFtiXIOe89JK8= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/109303] [13 Regression] ICE in push_agg_values_from_plats, at ipa-cp.cc:1458 since r13-3358-ge0403e95689af7d5 Date: Thu, 30 Mar 2023 07:21:39 +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: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.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=3D109303 --- Comment #6 from Jakub Jelinek --- Ok. It is yours then, for testcase perhaps: --- gcc/testsuite/gcc.dg/pr109303.c.jj 2023-03-29 18:42:31.068144102 +0200 +++ gcc/testsuite/gcc.dg/pr109303.c 2023-03-29 18:42:18.328330526 +0200 @@ -0,0 +1,24 @@ +/* PR ipa/109303 */ +/* { dg-do compile { target lp64 } } */ +/* { dg-options "-O2" } */ + +struct __attribute__((packed)) A { char c1; short a1[__INT_MAX__]; }; +struct __attribute__((packed)) B { char c2; short a2[100]; }; +struct S { struct A p1; struct B p2[4]; }; +void bar (short int); + +static void +foo (struct S *q) +{ + for (int i =3D 0; i < q->p1.c1; i++) + for (int j =3D 0; j < q->p2[i].c2; j++) + bar (q->p2[i].a2[j]); +} + +int +main () +{ + struct S q =3D {}; + q.p2[0].c2 =3D q.p2[1].c2 =3D 3; + foo (&q); +} (without lp64 it obviously fails on 32-bit targets).=