Right shift of int40_t value converted from float causes compiler to fail with INTERNAL ERROR: no match for SRL

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • Code Generation Tools
    • CODEGEN-13483
    • Hide
      C2000_22.6.0.LTS
      C6000_8.3.0
      MSP430_20.2.0.LTS
      MSP430_21.6.0.LTS
      C2000_21.6.0.LTS
      PRU_2.3.0
      ARM_20.2.0.LTS
      Show
      C2000_22.6.0.LTS C6000_8.3.0 MSP430_20.2.0.LTS MSP430_21.6.0.LTS C2000_21.6.0.LTS PRU_2.3.0 ARM_20.2.0.LTS
    • Hide
      C7000_5.0.1.LTS*
      MSP430_20.2.8.LTS*
      MSP430_21.6.2.LTS*
      C7000_4.1.2.LTS*
      ARM_20.2.8.LTS*
      C2000_22.6.3.LTS*
      C6000_8.3.14
      PRU_2.3.4*
      C2000_21.6.2.LTS*
      Show
      C7000_5.0.1.LTS* MSP430_20.2.8.LTS* MSP430_21.6.2.LTS* C7000_4.1.2.LTS* ARM_20.2.8.LTS* C2000_22.6.3.LTS* C6000_8.3.14 PRU_2.3.4* C2000_21.6.2.LTS*
    • default
    • Hide
      Declare local variable "val" as volatile:
      volatile __int40_t val = val_float;
      Show
      Declare local variable "val" as volatile: volatile __int40_t val = val_float;

      The compiler may abort with a "no match for SRL" error or may generate bad code when given code that converts a value from a float to an integer type wider than int, shifts that value to the right, and then converts the result to an int. This can happen whether the conversions are implicit or explicit.

          uint64_t val = val_float;
          int shift_result = val >> SHIFT;
      

            Assignee:
            TI User
            Reporter:
            TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Connection: Intermediate to External PROD System
                EXTSYNC-5143 - Right shift of int40_t value conver...
                SYNCHRONIZED
                • Last Sync Date: