From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E17213858C62; Wed, 8 Mar 2023 12:06:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E17213858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678277197; bh=I0CBuwVmDWPhujGk6z6W48c9WKUNTZtp9ot7dfL/xnE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RIDFxRJ5+wOxW5RTlYr2PNOe67jzeGjeJbIto8NlkwKgFw90k2bXFy0fOfiCiqzyY Y6wlikoFi41iwzFrxFdrRuyzlBQUuJV8khGYiOim8HGeJTkz61avfH+IFDgY57/Ka+ Icvh5wjvMeylYp3wUIeFmY/kCUcItHshuuyZr4Kw= From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing Date: Wed, 08 Mar 2023 12:06:37 +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: 13.0 X-Bugzilla-Keywords: needs-bisection, needs-reduction, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109031 --- Comment #8 from Martin Li=C5=A1ka --- (In reply to David Binderman from comment #7) > (In reply to David Binderman from comment #4) > > Created attachment 54596 [details] > > C source code > >=20 > > After 3 hours further reduction. >=20 > I am struggling with further reduction. My bash knowledge is short. >=20 > My cvise script is: >=20 > /usr/bin/gcc -w -Werror=3Dimplicit bug892.c \ > && (./a.out 1 > 1) \ > && /home/dcb36/gcc/results/bin/gcc -w -O2 -fno-strict-aliasing bug892.c=20 > \ > && (./a.out 1 > 2) \ > && diff 1 2; \ >=20 > but then if diff returns 1, the script should return 0 and > if diff returns 0, then the script should return 1. You can take an inspiration here: https://github.com/marxin/gcc-util/blob/master/bisect/reduce.sh and you can use multiple `if` statements.=