Compiler may crash on an intrinsic call that is given a function call for its argument.

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • Code Generation Tools
    • CODEGEN-15934
    • Hide
      C7000_6.x.0.LTS*
      C7000_5.0.0.LTS
      C7000_4.1.0.LTS
      Show
      C7000_6.x.0.LTS* C7000_5.0.0.LTS C7000_4.1.0.LTS
    • Hide
      C7000_6.x.0.LTS*
      C7000_4.1.3.LTS*
      C7000_5.0.3.LTS*
      Show
      C7000_6.x.0.LTS* C7000_4.1.3.LTS* C7000_5.0.3.LTS*
    • default

      This bug only occurs when the data type returned by the function (going into the intrinsic) is a class, struct or union type and that the class, struct or union is smaller than the vector width of the target.

      For example, this code may cause the bug.
      ```c
      __HWA_CONFIG_REG_v1 config = (...);

      __HWAOPEN(config, __gen_HWA_OFFSET_REG(), __MMA_OPEN_FSM_RESET);
      ```
      (`HWAOPEN` is an intrinsic that expects an `HWA_OFFSET_REG` struct as its second argument. The `gen_HWA_OFFSET_REG()` function returns that type of data)

      One workaround is to move the function call out into a new variable:
      ```c
      __HWA_CONFIG_REG_v1 config = (...);

      __HWA_OFFSET_REG offset_reg = __gen_HWA_OFFSET_REG();

      __HWAOPEN(config, offset_reg, __MMA_OPEN_FSM_RESET);
      ```

            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-6897 - Compiler may crash on an intrinsic ...
                SYNCHRONIZED
                • Last Sync Date: