Type pun with pointer conversion from non-complex to complex type may lose swap

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • Code Generation Tools
    • CODEGEN-10214
    • Hide
      C7000_1.4.0.LTS
      C6000_8.3.0
      C7000_2.1.0.LTS
      C7000_3.0.0.STS
      C7000_3.1.0.LTS
      Show
      C7000_1.4.0.LTS C6000_8.3.0 C7000_2.1.0.LTS C7000_3.0.0.STS C7000_3.1.0.LTS
    • Hide
      C7000_2.1.3.LTS*
      C7000_3.1.1.LTS
      C6000_8.3.13
      C7000_1.4.3.LTS
      Show
      C7000_2.1.3.LTS* C7000_3.1.1.LTS C6000_8.3.13 C7000_1.4.3.LTS
    • default
    • Hide
      For cl7x, use a reinterpret and swap operation explicitly. For example, instead of:
      cfloat cfvec = *((cfloat*)&fvec);
      Use:
      cfloat cfvec = __as_cfloat(__swap(fvec));
      Show
      For cl7x, use a reinterpret and swap operation explicitly. For example, instead of: cfloat cfvec = *((cfloat*)&fvec); Use: cfloat cfvec = __as_cfloat(__swap(fvec));

      Using a pointer conversion to type pun between a complex and non-complex vector type may result in incorrect representation of the complex result in register. For example:

      float2 fvec = (float2)(1.0f, 2.0f);
      cfloat cfvec = ((cfloat)&fvec);

      Will result in an incorrect ordering of the contents in cfvec.

            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-3461 - Type pun with pointer conversion fr...
                SYNCHRONIZED
                • Last Sync Date: