From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3C17C38582B0; Wed, 16 Aug 2023 21:24:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C17C38582B0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692221047; bh=hUREghQE+0/sMcaCO23q6+cd9/vVq0rCQLCtoW14J8Y=; h=From:To:Subject:Date:In-Reply-To:References:From; b=flRCextxE8oS8VR6PTVVWj4IskL31EfZGH39hxbMY1UAhYn3qUe8enN2ojgsv+se3 8asREH/O+lRiNy0kwPIO2JVO57ELHB4iLOQFEJyS3Sgm6l1DVa64iUX/Lm4YQDKdDb xCmUVj/LatAXrc8TOGRSoexy354UWcmEYiWcA5gE= From: "slyfox at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/111009] [12/13/14 regression] -fno-strict-overflow erroneously elides null pointer checks and causes SIGSEGV on perf from linux-6.4.10 Date: Wed, 16 Aug 2023 21:24:06 +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: slyfox at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created 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 --- Comment #9 from Sergei Trofimovich --- Created attachment 55744 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D55744&action=3Dedit bug.S At the hazard of stating the obvious: it's a wrong-code when you execute it (not a gcc ICE). Should fail on vanilla x86_64-linux-gnu. Tested on today's r14-3254-g9ade70bb86c874 as: $ gcc -Bgcc bug.c.c -fno-strict-overflow -O3 -o bug && ./bug Segmentation fault (core dumped) I also uploaded bug.S as an output of $ gcc -Bgcc bug.c.c -fno-strict-overflow -O3 -S -fverbose-asm -o bug.S if it helps you to find why your output is different.=