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

Vector element access via restrict-qualified pointer results in incorrect behavior

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium

      When accessing a vector object or array of vector-elements via a restrict-qualified pointer, the use of subvector/element access (.s0, .s1, etc) via a dereferenced pointer may result in incorrect results.

      The following conditions are required in order to see the incorrect behavior:
      (1a) A restrict-qualified vector pointer (e.g., int16_ptr) pointing to a native vector type object (int16 myvar) or
      (1b) A restrict-qualified vector-element pointer (e.g., int *) pointing to a vector element type object array (e.g. int [] array), and
      (2) A vector store to the object/array via the restrict-qualified pointer, and
      (3) A subsequent load of an element of the array or vector through the same restrict-qualified pointer with element-access syntax (.s0, .s1, etc).

      Other conditions also seem to be required and those need to be investigated.

      As supplied, the program builds with --opt_level=2. If that is changed to --opt_level=1, then the program works correctly.

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

              Created:
              Updated:
              Resolved: