Re: [Open64-devel] Fix a bug of alias analysis for parameters in nested PU

2010-12-20 Thread Jiangzhou HE
OK, thanks. On Tue, Dec 21, 2010 at 3:29 PM, Sun Chan wrote: > Jiangzhou, > yuor fix is good to go > Sun > > On Tue, Dec 21, 2010 at 1:40 PM, Jiangzhou HE > wrote: > > SCLASS_FORMAL_REF refers to pass-by-reference formals in Fortran. > > > > Since SCLASS_FORMAL_REF can be modified in the same w

Re: [Open64-devel] Fix a bug of alias analysis for parameters in nested PU

2010-12-20 Thread Sun Chan
Jiangzhou, yuor fix is good to go Sun On Tue, Dec 21, 2010 at 1:40 PM, Jiangzhou HE wrote: > SCLASS_FORMAL_REF refers to pass-by-reference formals in Fortran. > > Since SCLASS_FORMAL_REF can be modified in the same way as SCLASS_AUTO and > SCLASS_FORMAL, I think it is also necessary to add the gu

Re: [Open64-devel] Fix a bug of alias analysis for parameters in nested PU

2010-12-20 Thread Jiangzhou HE
SCLASS_FORMAL_REF refers to pass-by-reference formals in Fortran. Since SCLASS_FORMAL_REF can be modified in the same way as SCLASS_AUTO and SCLASS_FORMAL, I think it is also necessary to add the guarded code for SCLASS_FORMAL_REF. Thanks. On Tue, Dec 21, 2010 at 2:25 AM, Robert Kennedy wrote:

Re: [Open64-devel] Fix a bug of alias analysis for parameters in nested PU

2010-12-20 Thread Robert Kennedy
Sun Chan said: > you are right, I did not look careful enough. I haven't looked at the surrounding code, but I agree that on the surface the proposed change looks correct, at least for the SCLASS_FORMAL case. I don't remember the semantics for SCLASS_FORMAL_REF so I'm not sure about that part of t

Re: [Open64-devel] Fix a bug of alias analysis for parameters in nested PU

2010-12-20 Thread Robert Kennedy
> from the numbering, it seemed to be sgi bug numbers. Which means > Robert Kennedy (the original author of this code) added the comment, > for obvious reasons. I think Sun is right; those are my comments. Unfortunately I don't remember the details of those bugs nor the test cases they would have

Re: [Open64-devel] Fix a bug of alias analysis for parameters in nested PU

2010-12-20 Thread Sun Chan
you are right, I did not look careful enough. Sun 2010/12/20 Jiangzhou HE : > The current code uses ST_IDX_level(ST_st_idx(st)) == CURRENT_SYMTAB to > determine whether an auto variable is uplevel ref. My fix follows the old > way to do that. What is the right way? Thanks. > > On Mon, Dec 20, 2010

Re: [Open64-devel] Fix a bug of alias analysis for parameters in nested PU

2010-12-20 Thread Jiangzhou HE
The current code uses ST_IDX_level(ST_st_idx(st)) == CURRENT_SYMTAB to determine whether an auto variable is uplevel ref. My fix follows the old way to do that. What is the right way? Thanks. On Mon, Dec 20, 2010 at 7:46 PM, Sun Chan wrote: > I thought there is a bit in the symbol table that tel

Re: [Open64-devel] Fix a bug of alias analysis for parameters in nested PU

2010-12-20 Thread Jiangzhou HE
Yes, x is SCLASS_FORMAL. I meant the code treated x in the same way as a local variable. By adding guarded code for SCLASS_FORMAL, x would be treated in the same way as an uplevel auto variable. Thanks. On Mon, Dec 20, 2010 at 8:21 PM, Tianwei wrote: > > > On Mon, Dec 20, 2010 at 7:25 PM, Jiang

Re: [Open64-devel] Fix a bug of alias analysis for parameters in nested PU

2010-12-20 Thread Sun Chan
from the numbering, it seemed to be sgi bug numbers. Which means Robert Kennedy (the original author of this code) added the comment, for obvious reasons. The code must have a good reason to be there. Please read through the code again and make sure we are looking at uplevel ref the right way Sun

Re: [Open64-devel] Fix a bug of alias analysis for parameters in nested PU

2010-12-20 Thread Tianwei
On Mon, Dec 20, 2010 at 7:25 PM, Jiangzhou HE wrote: > Hi, > > Can a gatekeeper help to review the patch to bug 702 ( > https://bugs.open64.net/show_bug.cgi?id=702) > > This is the test case: > > #include > > void foo(int x) { > > void far() { > x++; > } > > void bar() { > int x2 =

Re: [Open64-devel] Fix a bug of alias analysis for parameters in nested PU

2010-12-20 Thread Sun Chan
I thought there is a bit in the symbol table that tells whether the symbol is uplevel ref. Your method seemed to be a hack Sun On Mon, Dec 20, 2010 at 7:25 PM, Jiangzhou HE wrote: > Hi, > > Can a gatekeeper help to review the patch to bug 702 > (https://bugs.open64.net/show_bug.cgi?id=702) > > Th

[Open64-devel] Fix a bug of alias analysis for parameters in nested PU

2010-12-20 Thread Jiangzhou HE
Hi, Can a gatekeeper help to review the patch to bug 702 ( https://bugs.open64.net/show_bug.cgi?id=702) This is the test case: #include void foo(int x) { void far() { x++; } void bar() { int x2 = x; far(); printf("%d %d\n", x, x2); } bar(); } int main() { foo(1)