From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 05AC13858D32; Thu, 13 Apr 2023 08:37:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 05AC13858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681375023; bh=ycvD3gZtMcv+oMb7HdpVbW7OcGYyoujHwqkpM9AbscM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uWl7M33ZJXwEsGAjfXptl7v15D9M9bfPrxJVsQtNv1pqE0qUrfHZzZbIUogpZNxrV t2cfG09EX0LwbZisC+buSBgjZdCCICRZt6WKrXm8Q8l5TtGSrupmH33TkeIYfvP6yj vCObcb98PlgDJmAXZSwcV/WDbdj2ULHTExFbmJCA= From: "xry111 at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/109493] Broken O2 optimization on s390x in GCC 13 Date: Thu, 13 Apr 2023 08:37:00 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: xry111 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D109493 Xi Ruoyao changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xry111 at gcc dot gnu.org --- Comment #7 from Xi Ruoyao --- (In reply to Mikhail Mitskevich from comment #4) > (In reply to Andrew Pinski from comment #1) > > belt_mac_st* st =3D &state; > > belt_mac_st* st2 =3D &state2; > > ((word*)(st->s))[0] =3D 0, ((word*)(st->s))[1] =3D 0; > > ((word*)(st->r))[0] =3D 0, ((word*)(st->r))[1] =3D 0; > > st->filled =3D 0; > >=20 > > I am 99% sure those are aliasing rule violations. > >=20 > > Does -fno-strict-aliasing help? >=20 > With -fno-strict-aliasing option code works as well as with -O1 option. Then it's likely the code is buggy, not GCC is buggy (unless you have some fancy type attributes on "word" or "belt_mac_st").=