From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 44A433861011; Sun, 18 Oct 2020 19:58:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 44A433861011 From: "hubicka at ucw dot cz" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBjLzk3MTcyXSBbMTEgUmVncmVzc2lvbl0gSUNFOiB0cmVl?= =?UTF-8?B?IGNvZGUg4oCYc3NhX25hbWXigJkgaXMgbm90IHN1cHBvcnRlZCBpbiBMVE8g?= =?UTF-8?B?c3RyZWFtcyBzaW5jZSByMTEtMzMwMy1nNjQ1MGYwNzM4OGY5ZmU1Nw==?= Date: Sun, 18 Oct 2020 19:58:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: ice-on-valid-code, lto X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at ucw dot cz X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.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: Sun, 18 Oct 2020 19:58:10 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97172 --- Comment #10 from Jan Hubicka --- > Unsharing the expression in the front end, before it's added to the attri= bute, > prevents this ICE, but I wouldn't expect that to be necessary. From what > little I know about how garbage collection in GCC works I would think nod= es > would only become eligible for collection after they were no longer refer= enced. No longer referened by something visible to the garbage collector :) But if the attribute is linked from the decl the garbage collector should see it. Did you watchpoint the pointer? Perhaps the expression is used by somehwere else and we fold/gimplify it to the version having SSA name in it. >=20 > Unsharing also doesn't solve the problem in pr97133 where the expression = that > causes the LTO ICE is a BIND_EXPR (bug 97133 comment #4 has more detail).= Why > is BIND_EXPR not handled by the streamer? Is it because it references the > function's parameter? Would that make other expressions that reference > function parameters a problem too? (In my limited testing most don't seem= to > be.) This is similar to why it does not stream SSA_NAMEs. BIND_EXPR is local to function body and thus it can not be pointed to from anything in the global stream. If one wants to take the random expression from funtion body and put it into global datastrutures, one has to use unshare_expr_without_location which strips away the pointer to blocks. Honza=