From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9A5DF393BC3E; Tue, 19 Jan 2021 13:29:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A5DF393BC3E From: "hubicka at ucw dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98330] [11 Regression] ICE in compute_parm_map, at ipa-modref.c:2900 since r9-2640-g3d78e00879b42574 Date: Tue, 19 Jan 2021 13:29:37 +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 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: Tue, 19 Jan 2021 13:29:37 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98330 --- Comment #8 from Jan Hubicka --- > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98330 >=20 > --- Comment #4 from Richard Biener --- > So modref allocates a fnspec_summary for an unknown indirect call (NULL c= allee) > but then in compute_parm_map calls function_or_virtual_thunk_symbol on > that NULL callee unconditionally. We have a meaningful fnspec for the > call because the call type has a 'fn spec' attribute attached. >=20 > So I'm proposing the following which avoids the ICE (and undefined behavi= or > calling a member fn on a NULL object) That looks OK. We do not expect fnspecs on types of indirect calls (we probably should, I just did not expected them to exist) but then we can always recover them from type. I suppose we do not need per-call-stmt sensitive fnspec attributes on indirect calls, right? Honza=