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

Andrew Pinski <pinskia at gcc dot gnu.org> 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 <pinskia at gcc dot gnu.org> ---
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 == '~')
    {
      if (TARGET_64BIT)
        fputc('w', file);
      return;
    }
  machine_mode mode = GET_MODE (op);
  enum rtx_code code = GET_CODE (op);
  const enum memmodel model = memmodel_base (INTVAL (op));


model should only be defined where it is used rather than in the top.

Reply via email to