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

            Bug ID: 85968
           Summary: gcc/config/arc/arc.c:9805: bad test ?
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

gcc/trunk/gcc/config/arc/arc.c:9805:65: warning: bitwise comparison always
evaluates to true [-Wtautological-compare]

Source code is

250266    claziss       if (((fn_type & ARC_FUNCTION_ILINK1) |
ARC_FUNCTION_FIRQ) != 0)
250266    claziss         regno = ILINK1_REGNUM;
250266    claziss       else if ((fn_type & ARC_FUNCTION_ILINK2) != 0)
250266    claziss         regno = ILINK2_REGNUM;
250266    claziss       else
250266    claziss         gcc_unreachable ();

but

  /* Fast interrupt is only available on ARCv2 processors.  */
  ARC_FUNCTION_FIRQ    = 1 << 3,

so regno only ever gets set to ILINK1_REGNUM.

Reply via email to