From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2E9003858D20; Fri, 3 Feb 2023 18:47:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2E9003858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675450031; bh=RqIAqFmQD6+E9yzUAX2I3LAZErFXcNFY1xz2xXIq7t4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CI23PeEKnlNhyWFwWua0vonVvoQZF4VTCAM2Qv8Jl4VwywDiqtn1wAzfnKEByV3Dm BJOeaNLQI+ZeQeiIYxAdgKXWrsHRDDFaeplSDkcWBtvZ37ODqg2vpuYJvjbEb8Z92d owSfAXfJVHGuWIkPhlHhYsxtbHhmkbOLXWGpM3L4= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/108657] csmith: possible wrong checksum with -O3 and -ftrivial-auto-var-init=zero Date: Fri, 03 Feb 2023 18:47:11 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org 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=3D108657 --- Comment #4 from Andrew Pinski --- (In reply to David Binderman from comment #3) > (In reply to Andrew Pinski from comment #2) > > If I initialize __trans_tmp_13 explictly to 0, the issue goes away .... >=20 > $ fgrep trans_tmp_13 bug880.c > int64_t __trans_tmp_13; > (g_452) ^=3D (__trans_tmp_13); > $=20 >=20 > This now looks like a bug in csmith. It might be both. I have not looked into the IR differences with respect of initializing and not initializing it and using/not using -ftrivial-auto-var-init=3Dzero yet. This was mostly to give a hint to the n= ext person who looks into this issue to see if they understand why there is a difference happening. -ftrivial-auto-var-init=3Dzero should produce the similar results to initia= lizing that variable to 0 but it is not. There has been some bugs (in GCC) recentl= y in the area of not executed pathes with uninitialized variables changing the behavior (incorrectly) so it might be related to one of those ...=