This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C6000-CGT: CGT 8.3.9 - cl6x: Not considering multiple exit conditions present in for loop syntax

Part Number: C6000-CGT

compiler upgraded from 7.3.23 -> 8.3.9 and facing stack corruption because compiler is not considering multiple exit conditions mentioned in the for loop.

FOR LOOP Syntax:
for(<iterator initialization>; <conditions (single/multipe)>; <iterator increment>)

Ex:

u8 a[constant_value] = {0};

for(u32 i=0; i < constant_value && i < f1(); i++)

{
  a[i] = 5; 
}

Old compiler 7.3.23 : considering both the exit conditions to come out of the loop [ i.e. taking MIN(constant_value, f1())] . It is behaving as expected and not causing any corruption issue.
New compiler 8.3.9 : considering only one condition i.e. i < f1() to exit the loop. This is leading to stack corruption due to for loop overrun.

Is there any optimization went in w.r.t to this area?

Please let me know is there any mechanism to resolve this issue with the new compiler 8.3.9.