From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CC42E3857818; Fri, 7 May 2021 07:51:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CC42E3857818 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/100464] [11/12 Regression] emitted binary code changes when -g is enabled at -O3 Date: Fri, 07 May 2021 07:51:09 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.2 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: Fri, 07 May 2021 07:51:09 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100464 --- Comment #3 from Richard Biener --- So the difference is that 'b' is TREE_ADDRESSABLE with -g but not without. in forwprop2 we do - # DEBUG j$40 =3D> MEM [(int *[33] *)&*.LC0{&} + 40B] + # DEBUG j$40 =3D> &b{&} and that makes b TREE_ADDRESSABLE which happens in tree canonicalize_constructor_val (tree cval, tree from_decl) { ... if (VAR_P (base)) TREE_ADDRESSABLE (base) =3D 1; which was added in r181197 as to fix "Java early folding". I'll test remov= ing that (it should assert the addressable flag is set, but _not_ when we're ultimatively coming from a debug stmt which means it'll be awkward to keep)= .=