From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1E4C03858C50; Wed, 23 Mar 2022 14:58:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1E4C03858C50 From: "amacleod at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/104986] [12 Regression] bogus writing 1 byte into a region of size 0 with -fwrapv and -O2 -fpeel-loops since r12-4698-gf6d012338bf87f42 Date: Wed, 23 Mar 2022 14:58:53 +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: 12.0 X-Bugzilla-Keywords: diagnostic, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: amacleod at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2022 14:58:54 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104986 --- Comment #7 from Andrew Macleod --- and I forgot to show to dom3 output which did the transformation: j.c.195t.dom3:Match-and-simplified (sizetype) nb_66 to 18446744073709551615 j.c.195t.dom3:Optimizing statement _2 =3D (sizetype) nb_66; j.c.195t.dom3: Replaced 'nb_66' with constant '-1' j.c.195t.dom3: nb_66 =3D -1; but for whatever reason it could not reduce nb_58 to anything better than [= -1, 0] nb_58 =3D prephitmp_30 + -5; Intersecting int [-1, 0] and int [-1, 4] to int [-1, 0]=