From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6A057385B51C; Wed, 8 Feb 2023 13:53:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6A057385B51C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675864404; bh=wpxtpckYzDnbbFzM2QLeisreT9zgfq6jbH0ikM5tnCI=; h=From:To:Subject:Date:From; b=QHD46Gy/Q2DyPmtQ9uc6qSyfQ8mbdYiDcTOb3kxV3GdSY6MiglP12Hq9Yk9StpS+u FfPpUoBE9crUVxe8klnV5PXiabnmXQUryfmupcPRF8+4BSTOLc+fvXtFThD5w2SID4 6YIwYpID58tZkkVREznPXC3cy/+dRYzi0oIbwLu4= From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/108718] New: csmith: possible bad code with -O2 Date: Wed, 08 Feb 2023 13:53:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dcb314 at hotmail dot com 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: 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=3D108718 Bug ID: 108718 Summary: csmith: possible bad code with -O2 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- Created attachment 54432 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D54432&action=3Dedit C source code The attached C code, produced by csmith, does this: $ ../results/bin/gcc -w -O1 bug883.c && ./a.out checksum =3D 7A94E377 $ ../results/bin/gcc -w -O2 bug883.c && ./a.out checksum =3D 842F1622 $=20 The bug seems to exist since sometime before 20220703 $ ../results.20220703/bin/gcc -w -O2 bug883.c && ./a.out checksum =3D 842F1622 $=20 I will have a go at a reduction.=