From: Ketan Dixit Date: Wed, 4 Aug 2010 20:53:10 +0000 (-0400) Subject: Added missing code block in find_lexical_block X-Git-Tag: release-v1.0~70 X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=c132c3da6d9df14b23cb87bb33bd060a033fa234;p=interaspect.git Added missing code block in find_lexical_block --- diff --git a/src/aop-pc-assign.c b/src/aop-pc-assign.c index 0c8cdf2..e73aa30 100644 --- a/src/aop-pc-assign.c +++ b/src/aop-pc-assign.c @@ -411,6 +411,7 @@ static bool find_lexical_block (tree lhs, tree block, int *indexp) { tree t; + tree subblock; /* Search locally */ if (BLOCK_VARS (block)) @@ -418,7 +419,20 @@ find_lexical_block (tree lhs, tree block, int *indexp) if (lhs == t) return true; - if(BLOCK_CHAIN (block)) + if (BLOCK_SUBBLOCKS (block)) + { + for (subblock = BLOCK_SUBBLOCKS (block); subblock; + subblock = BLOCK_CHAIN (block)) + { + (*indexp)++; + bool found = false; + found = find_lexical_block (lhs, subblock, indexp); + if (found) + return true; + } + } + + if (BLOCK_CHAIN (block)) { for (t = BLOCK_CHAIN (block); t; t = BLOCK_CHAIN(block)) {