From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 39A643858D38; Mon, 30 Jan 2023 14:00:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 39A643858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675087239; bh=RBmQAbbqK/oLcNbzF6wYj2X8fPrO9ILBVNs8THyyWVU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PeXr7Oz8t2NIiQna26U/DwtYh7VaoLQkr8EGVBLdgpQZt+YZRJuDgh8CFpdvJUk/n dJd/bHgV76KWYAYcuSsno4NsDSQ9ueX/NiR/yVHHUtFl24bo0WO571hz/cDZnozaNF VjWvJICSyNIJil7nBDJF1iHfgUf0SgdtSgz93zV4= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108599] [12/13 Regression] Incorrect code generation newer intel architectures Date: Mon, 30 Jan 2023 14:00:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.1.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status 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=3D108599 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #4 from Jakub Jelinek --- More simplified: struct S { unsigned long a, b, c, d; S () : a(0), b(0), c(0), d(0) {} S bar (unsigned long val) { a +=3D val; return *this; } S baz (unsigned long val) { b +=3D val; return *this; } }; __attribute__((noipa)) void foo (unsigned long x, unsigned long y, unsigned long z, unsigned long w, co= nst S s) { if (s.a !=3D x || s.b !=3D y || s.c !=3D z || s.d !=3D w) __builtin_abort (); } int main () { foo (16, 0, 0, 0, S ().bar (16).baz (0)); foo (16, 16, 0, 0, S ().bar (16).baz (16)); } It is main that is being miscompiled during RTL passes, in *.optimized we h= ave correct: MEM [(void *)&D.3337] =3D { 16, 0, 0, 0 }; foo (16, 0, 0, 0, D.3337); MEM [(void *)&D.3338] =3D { 16, 16, 0, 0 }; foo (16, 16, 0, 0, D.3338); but what is actually passed in the second case is { 16, 16, 16, 16 }. I'll have a look.=