Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Garbage value false positive when counting with modulus #21314

Open Quuxplusone opened 10 years ago

Quuxplusone commented 10 years ago
Bugzilla Link PR21315
Status NEW
Importance P normal
Reported by Bryce (bryceco@yahoo.com)
Reported on 2014-10-20 11:03:20 -0700
Last modified on 2014-10-20 11:03:20 -0700
Version trunk
Hardware Macintosh MacOS X
CC llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments main.c (485 bytes, text/x-c)
Blocks
Blocked by
See also
Created attachment 13224
test case

When iterating through an array beginning at an offset and wrapping around the
analyzer doesn't recognize which values are accessed. In the attached code all
array values but "skip" are initialized but the analyzer gives a "undefined
value" false positive when summing the elements.
Quuxplusone commented 10 years ago

Attached main.c (485 bytes, text/x-c): test case