Hi,

In the below program

proc test1(x: int ) {
   var x1: int = x;
   var done$: single bool = false;
   begin with (ref x1){
      test2(x1);
      if(x1 == 2) then
            done$ = true; // ---> SYNC LINE
     }
done$;
}

proc test2(ref x1) {
      writeln(x1);
}

proc main(){
    test1(1); // --> CALL 1
    test1(2); // --> CALL2
}

I am getting values currupted for both the function calls CALL1 and CALL2.
I understand why we get currupted value for CALL 1(since the SYNC LINE is
not executed). but why call 2 ?

-- 
Jyothi Krishna V.S.
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to