[Bug jit/95470] New: Type checking too rigid for shifts

bouanto at zoho dot com gcc-bugzilla@gcc.gnu.org
Tue Jun 2 00:16:48 GMT 2020


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

            Bug ID: 95470
           Summary: Type checking too rigid for shifts
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: jit
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: bouanto at zoho dot com
  Target Milestone: ---

Hi.
It seems the type checking for gcc_jit_context_new_binary_op
(GCC_JIT_BINARY_OP_LSHIFT) is too rigid.
For instance, you cannot shift an unsigned number with a negative (signed
number) because it wants both type to match.
I think it would make sense to allow a negative shift for unsigned numbers.
Thanks.


More information about the Gcc-bugs mailing list