Fix PR2423 by checking all indices for out of range access, not only
authorChris Lattner <sabre@nondot.org>
Sat, 23 Aug 2008 05:21:06 +0000 (05:21 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 23 Aug 2008 05:21:06 +0000 (05:21 +0000)
commit88e6dc8bf14e8a98888f62173a6581386b8d29a0
treebfebfb3e4e551700336b994dd70cd26d726455ec
parentb4f572597e04aadb8481742825c846988d7e6781
Fix PR2423 by checking all indices for out of range access, not only
indices that start with an array subscript.  x->field[10000] is just
as bad as (*X)[14][10000].

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55226 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/ScalarReplAggregates.cpp
test/Transforms/ScalarRepl/2008-08-22-out-of-range-array-promote.ll [new file with mode: 0644]