From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9840F3858032; Thu, 9 Mar 2023 09:45:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9840F3858032 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678355146; bh=u2eUQtZbFY1gcO34Lr2L1OuvVLIlbw5VcxstB2mDS8M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MIAGSFmRe/XJNCLoHnG6KQFVDtkA7jP68tBM85V6G5M3/0vcStlT8G9mguwXOjej4 s9b41COYic3poHmMhBnlSi0irHtqCOVsqN2LhzgIT7wmpP5EfiVcGUwwIYQo8SOzoT dzWvfnQA9xPF/HsDGNZb/IlCjG8cY0A70ud2LdcI= From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing since r13-254-gdd3c7873a61019e9 Date: Thu, 09 Mar 2023 09:45:46 +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-reduction, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: dcb314 at hotmail dot com X-Bugzilla-Status: NEW 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 #24 from David Binderman --- I tried experimenting with the flags that change -O1 into -O2 and got this: $ for i in ~/gcc/results.202205*/bin/gcc; do echo $i; $i -w -ftrivial-auto-var-init=3Dzero -O1 -fno-strict-aliasing bug892.c && (./a.ou= t 1 | fgrep g_50); done /home/dcb36/gcc/results.20220501/bin/gcc ...checksum after hashing g_50 : 646CF84D /home/dcb36/gcc/results.20220508/bin/gcc ...checksum after hashing g_50 : 646CF84D /home/dcb36/gcc/results.20220515/bin/gcc ...checksum after hashing g_50 : 646CF84D $ for i in ~/gcc/results.202205*/bin/gcc; do echo $i; $i -w -ftrivial-auto-var-init=3Dzero -O1 -fcode-hoisting -fno-strict-aliasing bug= 892.c && (./a.out 1 | fgrep g_50); done /home/dcb36/gcc/results.20220501/bin/gcc ...checksum after hashing g_50 : 646CF84D /home/dcb36/gcc/results.20220508/bin/gcc ...checksum after hashing g_50 : 646CF84D /home/dcb36/gcc/results.20220515/bin/gcc ...checksum after hashing g_50 : C21BF3F9 so the -fcode-hoisting looks to be part of the problem.=