From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C59993858D20; Wed, 15 Nov 2023 16:59:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C59993858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700067594; bh=270TjcOG6Qg3rXl4IEAhVrL5004+O+eBGOVrnEsxCAo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CmoMv8tMqhq6/W+FdwATR/yAa/vwH0lzYGMGz+COdEpSuOKLnAxsatlT4osrc7DNy +LFW8k/gNpadkOfcA5MSx4o+d5flZ1rd1gSaKlUFdcxPUug0Xf1j0C721jkIn3IUh2 hccsHUgTZhtbYTfSiUdnLN8npG1PD+2zJHkm6XsM= From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/112550] Difference in output from -O0 to -01 ? Date: Wed, 15 Nov 2023 16:59:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 14.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: 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=3D112550 --- Comment #2 from David Binderman --- (In reply to Sam James from comment #1) > Not sure if I'm misunderstanding you, but it's not trivial to go from -O0 > and -O1 and it's "normal" to have a difference in output in either the ca= se > of: a) UB, or b) a compiler bug (miscompilation). The source code I provided is produced by csmith and then preprocessed. I tried the upstream unpreprocessed source code on clang -O0 and gcc -O0 and they agreed on the output, so it looked to me like csmith was working o= k. Only when I changed over from gcc -O0 to gcc -O1 did I see a difference.=