[EXT_EP-11767] Unaligned vector accessor may lead to abnormal optimizer termination Created: 16/May/24  Updated: 18/Aug/25  Resolved: 14/Nov/24

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-12473
Forum URL: https://e2e.ti.com/e2eprivate/valeo/valeo-ep-automotive/f/1132/t/1362720
Found In Release: C7000_3.1.0.LTS
C7000_4.1.0.LTS
Fix In Release: C7000_5.0.0.LTS
C7000_3.1.3.LTS*
C7000_4.1.1.LTS
Affected Platform/Device: default
Workaround: In the case where the optimizer has to unroll to find out the index is a constant integer, use "#pragma UNROLL(1)" to prevent unrolling.

 Description   

The optimizer can crash when trying to access part of a vector by taking the address of a vector accessor expression (.s[]) with an index that is unaligned relative to the size of the pointer access. For example, given "_uchar64 v", trying to access (*(uchar4 *)&v.s[1]) can cause the optimizer to abort with an internal error. This internal error can arise even if the index is an expression, if the optimizer can optimize the code and discover that the expression is unaligned. For example, the optimizer could fully unroll "for (i=0;i<16;i++) *(_uchar4 *)&v.s[i] = ...", yielding 16 statements of the form v.s[0], v.s[1], etc.


Generated at Sat Dec 13 11:38:00 CST 2025 using Jira 10.3.7#10030007-sha1:a563685562f94d165eb4e158cfb2a142338d8c54.