From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0EC9638555A4; Wed, 8 Mar 2023 17:12:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0EC9638555A4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678295546; bh=7R0qGYnAydskUYRMShXaG6sA7izSoZ7p9ogpDxkMHr8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FiugcGKaYqm5mU3JJ5i6bmVzcnuEXcEFyvXbMivmdvTcHdeYi8Lz1PE4VpdwEH+dL STRC3gz156FTAPMiIdROz3L2jT+qrmI0gYWcuVwpQJbpaPCHKCYrMFq/86Lj4eYvKb HGWONowYV2JtGsP79ZMJCLBUe0ErU5r6WuCVjoOQ= 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 Date: Wed, 08 Mar 2023 17:12:25 +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: 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: 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 #18 from David Binderman --- Part way through reduction, the C code seems to be int crc32_tab_0; int crc32_context =3D 0xFFFFFFFFUL; void main(int , char []) { { int crc; int i; i =3D 0; for (; i < 256; i++) crc32_tab_0 =3D crc; { { crc32_context =3D 0 ^ crc32_tab_0; } } printf("...checksum after hashing %s : %lX\n", "g_50", crc32_context ^ 0xFFFFFFFFUL); } } This looks to me like reading rubbish off the local variable stack in main and then hashing it. AFAIK not a bug in gcc, but may be a bug in csmith.=