From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 140AE3858415; Tue, 2 Nov 2021 19:53:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 140AE3858415 From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103050] [12 Regression] 520.omnetpp_r miscompiled after r12-4787-gb8ef019ab938471f Date: Tue, 02 Nov 2021 19:53:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org 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: --- 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: Tue, 02 Nov 2021 19:53:58 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103050 --- Comment #6 from Martin Li=C5=A1ka --- I was able to track that to ltrans0, where one needs 2 optimizations to hap= pen: -fdbg-cnt=3Dipa_mod_ref_pta:1296-1296:1482-1482 then optimized dump differs (good vs. bad) in: void recordScalar (struct cFileOutputScalarManager * const this, struct cComponent * component, const char * name, double value, struct opp_string_= map * attributes) { ... [local count: 84297948]: _152 =3D D.31174._M_dataplus._M_p; - if (&D.31174.D.4725._M_local_buf !=3D _152) - goto ; [53.47%] - else - goto ; [46.53%] - - [local count: 45074110]: ... _202 =3D D.31174._M_dataplus._M_p; - if (&D.31174.D.4725._M_local_buf !=3D _202) - goto ; [0.00%] - else - goto ; [0.00%] - - [count: 0]: _203 =3D D.31174.D.4725._M_allocated_capacity; _204 =3D _203 + 1; operator delete (_202, _204);=