From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BB0303858C62; Sun, 6 Nov 2022 18:28:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BB0303858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667759336; bh=VYYUkw09OI13v9SOOgy0BDMv2F924XQWduiw5sbNseQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TutY34p+qGNVljpC9Bh/viSs1o/bqPmgOTyXVU2BZFv1nGpcErysklPWjGxbUURzz y8WsjTKmjGVux5YhzjCcFoByStYb7gisFjUaOS/1Q1uCUSjTybbI4Yn2akTv7RBHsk D9p8IWcGUnNYmsOn1mnsl1Np4fd9Za8WjA/fbwtI= From: "franckbehaghel_gcc at protonmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107541] [13 Regression] wrong code at -O1, -O2 and -O3 on x86_64-linux-gnu Date: Sun, 06 Nov 2022 18:28:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: franckbehaghel_gcc at protonmail 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: cc attachments.created 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=3D107541 Franck Behaghel changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |franckbehaghel_gcc@protonma | |il.com --- Comment #1 from Franck Behaghel --- Created attachment 53839 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53839&action=3Dedit reduce testcase Confirmed on master ( 3ad2167bbac8ae83b1e91305b105ab5287bdac55 ) It might be related with integer promotion on char type with ~ and / . A reduce testcase. gcc main.cpp -O2 ; ./a.out ;echo "*****" ; gcc main.cpp ; ./a.out b : 128 ***** b : 129=