https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106544

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Kito Cheng <k...@gcc.gnu.org>:

https://gcc.gnu.org/g:6547906bdbdb3feb0d3bd96e09ceffcbc489349f

commit r14-11554-g6547906bdbdb3feb0d3bd96e09ceffcbc489349f
Author: Jeff Law <j...@ventanamicro.com>
Date:   Mon Dec 30 13:51:55 2024 -0700

    [RISC-V][PR target/106544] Avoid ICEs due to bogus asms

    This is a fix for a bug Andrew P filed a while back where essentially a
poorly
    crafted asm statement could trigger a ICE during assembly output.  Various
    cases will use INTVAL (op) without verifying the operand is a CONST_INT
node
    first.

    The usual way to handle this is via output_operand_lossage, which this
patch
    implements.

    I focused primarily on the CONST_INT cases, there could well be other
problems
    in this space, if so they should get distinct bugs with testcases.

    Tested in my tester on rv32 and rv64.  Waiting for pre-commit testing
before
    moving forward.

            PR target/106544
    gcc/

            * config/riscv/riscv.cc (riscv_print_operand): Issue an error for
            invalid operands rather than invalidly accessing INTVAL of an
            object that is not a CONST_INT.  Fix one error string for 'N'.

    gcc/testsuite
            * gcc.target/riscv/pr106544.c: New test.

Reply via email to