perform substitutions on size expression of array declared in inlined function
commit5d1004252648acb81014b34b2eb77c47a87bfe75
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 15 Apr 2016 10:09:46 +0000 (15 12:09 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 15 Apr 2016 13:02:30 +0000 (15 15:02 +0200)
tree047e8e17850a5ecbb9353cd41c3d8b0247cfffc2
parentf5ec14de29cfe3eda3bc0fc231db184a72df1df0
perform substitutions on size expression of array declared in inlined function

During inlining, the function parameters may get renamed apart from
other variables in the calling function.  These renamings are applied
to the tree representing the body of the inlined function, but
the size expressions of the arrays declared in the function are
only derived afterwards and these substitutions are therefore not
taken into account in the size expressions.
Precompute these size expressions and replace them by the result
of applying the substitutions such that later calls to get_array_size
will return the modified size expressions.

Reported-by: Bruno bodin <bbodin@inf.ed.ac.uk>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
scan.cc
scan.h
tests/inline11.c [new file with mode: 0644]
tests/inline11.scop [new file with mode: 0644]