[EXT_EP-10864] Type pun with pointer conversion from non-complex to complex type may lose swap Created: 13/Jul/22 Updated: 04/Mar/23 Resolved: 04/Mar/23 |
|
Status: | Fixed |
Project: | Embedded Software & Tools |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Medium |
Reporter: | TI User | Assignee: | TI User |
Resolution: | Fixed | Votes: | 0 |
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Product: | Code Generation Tools |
Internal ID: | CODEGEN-10214 |
Found In Release: | C7000_1.4.0.LTS C6000_8.3.0 C7000_2.1.0.LTS C7000_3.0.0.STS C7000_3.1.0.LTS |
Fix In Release: | C7000_2.1.3.LTS* C7000_3.1.1.LTS* C7000_1.4.3.LTS C6000_8.3.13* |
Affected Platform/Device: | default |
Workaround: | For cl7x, use a reinterpret and swap operation explicitly. For example, instead of:
cfloat cfvec = *((cfloat*)&fvec); Use: cfloat cfvec = __as_cfloat(__swap(fvec)); |
Description |
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); Will result in an incorrect ordering of the contents in cfvec. |