From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4A36A3858401; Wed, 24 Jan 2024 21:47:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4A36A3858401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706132859; bh=L9S4Ug97B8ysU3aEEN0HwF9cIvIlgny8yKds7Vlthvw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=yh8xWoSbz8bk+PGmyVsgUxM1HPzOnH+Mh6nXfusi5aDj4cXPh2lVJVMjAKVoB4GqN Ni34PZJZHv0mh1Z1UKXcBiVr7PzZXl6CzfgKRVG+spMR9oFQT8PHgXVNJpiPwuA6c3 /y9oSlqAl6RP2txwrG8x3hEOrpcJf7WAXnPMenEs= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113010] [RISCV] sign-extension lost in comparison with constant embedded in comma-op expression Date: Wed, 24 Jan 2024 21:47:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW 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=3D113010 --- Comment #9 from Andrew Pinski --- (In reply to Patrick O'Neill from comment #8) > From the CI run here: > https://patchwork.sourceware.org/project/gcc/patch/20240116221914.267015-= 1- > gkm@rivosinc.com/ >=20 > It looks like this issue also affects ARM since the testcase fails. That is aarch32 (a ILP32 target) where long is the same size as int. I susp= ect you will end up with a failure even on i386 (32bit) with the current testca= se. I suspect you want to use either 0xffffffffull or limit it to `sizeof(long)= > sizeof(int)` targets.=