From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2844538460B4; Wed, 8 May 2024 12:03:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2844538460B4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1715169793; bh=GWspxKwQsvB1EOG+rDZaNuuHm8MG8Z/Eo+fLDoQLpxc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=R4oyt4e29e28AZi2xWXzeLR8eSuZcXgMKfnhW4qrxUD3XOXXgxY1/E9Brh6RNMguh I4PD4FyAS+gbQvgmeFv81p+MpTR6Vw3FEsjuJVf1PUDxeR/0/WAML2M92ewUnZ/5KV don41TN1bgaY/rKmGNt4zW1aGeTtiqaNdA0vqNyU= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/111009] [12/13 regression] -fno-strict-overflow erroneously elides null pointer checks and causes SIGSEGV on perf from linux-6.4.10 Date: Wed, 08 May 2024 12:03:12 +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: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: amacleod at redhat dot com X-Bugzilla-Target-Milestone: 12.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to bug_status 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111009 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |amacleod at redhat = dot com Status|NEW |ASSIGNED --- Comment #13 from Richard Biener --- Andrew - this doesn't pick to gcc-13 because of the following but we should backport the fix somehow. Can you please see to that in time for GCC 13.3 (next week)? /space/rguenther/src/gcc-13-branch/gcc/range-op.cc: In member function =E2= =80=98virtual bool operator_addr_expr::op1_range(irange&, tree, const irange&, const iran= ge&, relation_trio) const=E2=80=99: /space/rguenther/src/gcc-13-branch/gcc/range-op.cc:4366:8: error: =E2=80=98contains_zero_p=E2=80=99 was not declared in this scope if (!contains_zero_p (lhs) && TYPE_OVERFLOW_UNDEFINED (type)) ^~~~~~~~~~~~~~~ /space/rguenther/src/gcc-13-branch/gcc/range-op.cc:4366:8: note: suggested alternative: =E2=80=98contains_mem_rtx_p=E2=80=99 if (!contains_zero_p (lhs) && TYPE_OVERFLOW_UNDEFINED (type)) ^~~~~~~~~~~~~~~ contains_mem_rtx_p=