From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3B7583858D28; Thu, 4 May 2023 04:27:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3B7583858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683174454; bh=4fFV0LYpWlP2sW74sMZsyb/hfy/47YAKxdvWSnfQ4Lk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sCIrTfstxisftXzcnH190LZEa9VNcOuWRIa0nnM28YHpT2ZgXEjmglPIytZuOo8lB 8AZkPMR4xuq27Tf/CBFTiW338nxR/av1UE1Egpa4bFWbJggBsKTxgIWNT1Jgad+CJ+ 8zuItFoWHCOSaVf0eoNj8BzhD47GszGrjOljOEd4= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/109725] [14 Regression] ICE: RTL check: expected code 'const_int', have 'reg' in riscv_print_operand, at config/riscv/riscv.cc:4430 Date: Thu, 04 May 2023 04:27:34 +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: 14.0 X-Bugzilla-Keywords: build, ice-checking, ice-on-valid-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: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_reconfirmed_on bug_status target_milestone everconfirmed keywords 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=3D109725 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-05-04 Status|UNCONFIRMED |NEW Target Milestone|--- |14.0 Ever confirmed|0 |1 Keywords| |ice-checking --- Comment #1 from Andrew Pinski --- Yes this is bad coding: static void riscv_print_operand (FILE *file, rtx op, int letter) { /* `~` does not take an operand so op will be null Check for before accessing op. */ if (letter =3D=3D '~') { if (TARGET_64BIT) fputc('w', file); return; } machine_mode mode =3D GET_MODE (op); enum rtx_code code =3D GET_CODE (op); const enum memmodel model =3D memmodel_base (INTVAL (op)); model should only be defined where it is used rather than in the top.=