From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C16323857C43; Thu, 24 Sep 2020 07:02:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C16323857C43 From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/97175] [11 Regression] ICE in maybe_warn_for_bound, at builtins.c:3483 since r11-2928-gd14c547abd484d35 Date: Thu, 24 Sep 2020 07:02: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: 11.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: dcb314 at hotmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: msebor 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: Thu, 24 Sep 2020 07:02:53 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97175 --- Comment #5 from David Binderman --- >>From the text in the proposed patch: >Using DECL_SOURCE_LOCATION() with a tree node that's not a DECL >isn't a good idea, and neither is using EXPR_LOCATION() with >a node that is a DECL. Both trigger an ICE when presented with >a node they don't expect.=20 How much work would it be to move this test from run time to compile time ? So if DECL_SOURCE_LOCATION was given a non-DECL node or EXPR_LOCATION is given a DECL, then gcc refuses to compile. Flushing out all the bugs where these macros are misused sounds like a step in the right direction to me.=