From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 755533858D33; Tue, 14 Feb 2023 21:09:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 755533858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676408941; bh=miri4qNBHpQurvgV0fuXHwn5Ead9Thl4jMp1YIkuxuU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WAp5d/PN/Y4LAM4NfDyyrjpOiKLxc9vKSD7HCAGKomH+hryv3OADdv9Bx2UnrLgd0 xz6d0Fa2NsrepRUskIAnsoBXj3ZIzI9MycIJ4KQ9mCQNoO90gZFGNb4nu/YHTmSbyF UxqaztYOG/MIChrtFAjTlPajnP9258efLasBokhA= From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/108657] [13 Regression] csmith: possible wrong checksum with -O3 and -ftrivial-auto-var-init=zero Date: Tue, 14 Feb 2023 21:09:01 +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: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 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=3D108657 --- Comment #14 from David Binderman --- After five hours of reduction, cvise has: crc32_tab[256]; unsigned crc32_context =3D 4294967295; void crc32_byte(b) { crc32_context =3D crc32_context >> 8 ^ crc32_tab[(crc32_context ^ b) & 25= 5]; } void transparent_crc(long val, char *vname) { crc32_context =3D crc32_context >> 8 ^ crc32_tab[(crc32_context ^ val) & = 255]; crc32_byte(val >> 8); crc32_byte(val >> 16); crc32_byte(val >> 24); crc32_byte(val >> 32); crc32_byte(val >> 40); crc32_byte(val >> 48); crc32_byte(val >> 56); printf("...checksum after hashing %s : %lX\n", vname, crc32_context ^ 4294967295); } g_21 =3D -8; short g_41; g_78; static *g_451 =3D &g_78; g_452; func_11___trans_tmp_13; main_i; unsigned main_crc; main_j; void main() { for (; main_i < 256; main_i++) { main_crc =3D main_i; main_j =3D 8; for (; main_j; main_j--) if (main_crc & 1) main_crc =3D main_crc >> 1 ^ 3988292384; else main_crc >>=3D 1; crc32_tab[main_i] =3D main_crc; } int l_794; g_41 =3D 53935 & g_21; g_21 =3D -18; g_78 =3D 1; for (; g_78 >=3D 0; g_78 -=3D 1) { g_452 =3D l_794 =3D 0; for (; l_794 <=3D 3; l_794 +=3D 1) { short l_895[1]; if (g_452) break; g_452 ^=3D func_11___trans_tmp_13; } } *g_451 =3D 8 || 0; transparent_crc(g_21, ""); transparent_crc(g_41, ""); transparent_crc(2185655400, ""); transparent_crc(g_78, "g_78"); }=