<div dir="ltr"><div dir="ltr"><div>This one looks very similar, if not the same, as the case in a previous email. </div><div><br></div><div>If I try to use __builtin_assume to tell the SA that len is > 0, I still see the SA error. It seems the analyzer is exploring a case where the expression "(len*2)" is equal to 0 from what I can see?</div><div><br></div><div>Does this makes sense, or perhaps I'm missing something? </div><div><br></div><div>Thanks - Vince </div><div dir="ltr"><br></div><div dir="ltr">clang -cc1 -analyze  -analyzer-checker=core    test.c<br>test.c:14:17: warning: The left operand of '==' is a garbage value<br>    if (ptrs[i] == ptrs[i+len])<br>        ~~~~~~~ ^<br>1 warning generated.</div><div dir="ltr"><br></div><div>The reproducer … </div><div><br></div><div dir="ltr">int getV();// { return 0; }</div><div dir="ltr">void foo() {<br>  int len = getV();<br>  <br>  int ptrs[len*2];</div><div dir="ltr">  for (int i = 0; i < (len*2); i++) {<br>    ptrs[i] = 0;<br>  }</div><div dir="ltr">  for (int i = 0; i < len; i++) {<br>    if (ptrs[i] == ptrs[i+len])<br>        return;<br>  }<br>}<br><br></div></div></div>