Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-9381

Pointer to VLA 2D array computation in IF condition is double-adjusted and garbled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • Code Generation Tools
    • CODEGEN-6289
    • Hide
      C2000_20.2.0.beta
      C6000_8.2.0
      C2000_18.1.0.LTS
      C6000_8.3.0
      ARM_18.12.0.LTS
      PRU_2.3.0
      C7000_1.2.0.STS
      ARM_18.1.0.LTS
      MSP430_18.1.0.LTS
      PRU_2.4.0*
      MSP430_18.12.0.LTS
      ARM_20.2.0.beta
      C2000_18.12.0.LTS
      MSP430_20.2.0.beta
      Show
      C2000_20.2.0.beta C6000_8.2.0 C2000_18.1.0.LTS C6000_8.3.0 ARM_18.12.0.LTS PRU_2.3.0 C7000_1.2.0.STS ARM_18.1.0.LTS MSP430_18.1.0.LTS PRU_2.4.0* MSP430_18.12.0.LTS ARM_20.2.0.beta C2000_18.12.0.LTS MSP430_20.2.0.beta
    • Hide
      C2000_20.2.0.beta
      C2000_18.1.7.LTS
      ARM_18.12.3.LTS
      ARM_18.1.7.LTS
      MSP430_18.12.3.LTS
      C2000_18.12.3.LTS
      C7000_1.2.0.STS
      PRU_2.3.3
      PRU_2.4.0*
      MSP430_18.1.7.LTS
      C6000_8.3.5
      C6000_8.2.8
      ARM_20.2.0.beta
      MSP430_20.2.0.beta
      Show
      C2000_20.2.0.beta C2000_18.1.7.LTS ARM_18.12.3.LTS ARM_18.1.7.LTS MSP430_18.12.3.LTS C2000_18.12.3.LTS C7000_1.2.0.STS PRU_2.3.3 PRU_2.4.0* MSP430_18.1.7.LTS C6000_8.3.5 C6000_8.2.8 ARM_20.2.0.beta MSP430_20.2.0.beta
    • default
    • Hide
      Given "if (p[i][j])", moving the access into a temp with "T = p[i][j]; if (T)" is the simplest workaround. Since the bug happens early in compilation, optimisation level doesn't matter.

      Recasting the IF as a quest/colon, if feasible, is also a workaround.
      Show
      Given "if (p[i][j])", moving the access into a temp with "T = p[i][j]; if (T)" is the simplest workaround. Since the bug happens early in compilation, optimisation level doesn't matter. Recasting the IF as a quest/colon, if feasible, is also a workaround.
    • A variable-length-array access for an array of at least two dimensions, if used in the predicate of an IF statement, may be mishandled and refer to an incorrect element, possibly outside the array.

      Pointer to VLA 2D array computation in IF condition is double-adjusted and garbled

            syncuser TI User
            syncuser TI User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: