From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E4DA93858C50; Sat, 18 Mar 2023 11:21:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E4DA93858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679138515; bh=xEn48+9YhIO97DGZpnqEDp1jLbJZaN/vXKulTLXQNdY=; h=From:To:Subject:Date:From; b=R3wFCA5SerSGaOvSeWplpss9Yl3sl3ZsrnnckZcrOoHb6YN7r2BjEWTpka+Vln1di 9zAc13FjnAI7r8xY3onH3FKtOg4mvmMqDoXjkWZ2+s5gisULb0W/LdkbrEjB0VoNgZ YYr6nGlSUP1l3YTenU+QOV4U0FRJfTjYPB7fhx+k= From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/109184] New: csmith: really old bug with -O3 Date: Sat, 18 Mar 2023 11:21:55 +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=3D109184 Bug ID: 109184 Summary: csmith: really old bug with -O3 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 54701 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D54701&action=3Dedit C source code For the attached C code, compiled with -O2 and -O3, produces different answ= ers: $ ~/gcc/results/bin/gcc -w -O2 -fno-strict-aliasing bug897.c $ ./a.out 1 > 1 $ $ ~/gcc/results/bin/gcc -w -O3 -fno-strict-aliasing bug897.c $ ./a.out 1 > 2 $ diff 1 2 | head 2038c2038 < ...checksum after hashing g_1731[i][j] : 351CD463 --- > ...checksum after hashing g_1731[i][j] : 7739D31E 2040c2040 < ...checksum after hashing g_1731[i][j] : 791FAA71 --- > ...checksum after hashing g_1731[i][j] : FEBF8F12 The bug seems to exist since sometime before 20220403, nearly a year ago. Flag -ftrivial-auto-var-init=3Dzero doesn't seem to help.=