Subject: Re: your mail

From: Zheng Gengbing <[email-masked]>
Date: Mon, 22 Apr 1996 18:15:32 +0800 (EAT)

On Thu, 18 Apr 1996, Zheng Qiang wrote:

> Hi, Zheng Gengbing
> 
>   The following are the bug report 1- 9 and my comment on these:
> _______________________________________________________________
> _________________________
> 
> Subject: bug reports 1 & 2
> 
> The problem in following program is that the parser can not find correct label in the
> program.
> 
> program e4
> save sa
> integer a(i+10,12)
> 12   c=a(1,1)+2
> end
> 
> +++++++++++++++++++++++++
> I made some modification in the function lnkStmts() in the file exec_part.c. But now I
> cannot recall them. It seemed like that I insert " newStmt->label = newLabel; " in that
> function.
> *************************
>

	We have noticed this .

> _________________________
> 
> Subject: bug report 3
> 
> The parser can not deal with the following things. 
> 
> MODULE mod14
>   CONTAINS
>     FUNCTION prc3 (dum39)
>     INTEGER, INTENT(IN) :: dum39
>     END FUNCTION
> END MODULE
> 
> +++++++++++++++++++++++++
> I will ask Lxy to tell you about the modification.
> *************************
> 
> _________________________
> 
> Subject: bug reports 4
> 
> Segment fault for the following segment
> 
> program test
>   DO 1240 WHILE (var128 .NE. 0)
>   1240 var128 = 0
> 
> end
> +++++++++++++++++++++++++
> I cannot remember where did I make the modification now, sorry.
> *************************
> 

	This sample is Ok in our version two . I remeber that we also
have this bug  before .

> _________________________
> 
> Subject: bug report 5
> 
> --------------------------------------------------------
>       program test
>       do while (i .gt. j)
>          i = i - 1
>       enddo
>       end
> -------------------------------------------
> when dump dep, we got following:
> 
> ***BIF NODES***
> 
>   id  var  cp   bp1  cmnt  sym    lp1    lp2    lp3    dp1  dp2   lab  lbl glin llin  file  thread
>   1-B 100  ----  --  ----  ----   ----   ----   ----   --   --   ----  --   0    0     1-F     2-B       GLOBAL
>                2-B    --
>               --
>          decl_specs(bits set)=
>   2-B 101   1-B  --  ----   2-S   ----   ----   ----   --   --   ----  --   1	 1     1-F     3-B    PROG_HEDR
>                3-B     3-B     6-B    --
>               --
>          decl_specs(bits set)=
>   3-B 174   2-B  --  ----  ----    3-E   ----   ----   --   --   ----  --   3	 3     1-F     4-B DO_WHILE_NODE
>                4-B     5-B    --
>               --
> 
> ....more
> -----------------------------------------------------------------------
> The problem is BFND 2, he has 3-B and 6-B as sons, but 3-B was repeated. So
> when I unparse it, the do-while construct will appear twice.
> 
> +++++++++++++++++++++++++
> In the function lnkStmts() in the file exec_part.c, the original statement is:
> (the function of this statement is to link the structure or the statement with
> sons of BFND with the previous statement( his brother ) )
> 
> if((newStmt->variant!= WHERE_BLOCK_STMT)&&(newStmt->variant!= SWITCH_NODE)
>             &&(newStmt->variant!= FOR_NODE)&&(newStmt->variant!= IF_NODE)
>             &&(newStmt->variant!= FORALL_CONSTRUCT_STMT)&&(newStmt->variant!= LOGIF_NODE)
>             &&(newStmt->variant!= ELSEIF_NODE)&&(newStmt->variant!= WHILE_NODE)
>                 newList = setBfndList(oldList,newStmt);
> 
> But I forgot "do while" and "forall",this statement is fixed to the following to fix the bug:
> 
> if((newStmt->variant!= WHERE_BLOCK_STMT)&&(newStmt->variant!= SWITCH_NODE)
>             &&(newStmt->variant!= FOR_NODE)&&(newStmt->variant!= IF_NODE)
>             &&(newStmt->variant!= FORALL_CONSTRUCT_STMT)&&(newStmt->variant!= LOGIF_NODE)
>             &&(newStmt->variant!= ELSEIF_NODE)&&(newStmt->variant!= WHILE_NODE)
>             &&(newStmt->variant!= DO_WHILE_NODE)&&(newStmt->variant!= FORALL_STMT))
>                 newList = setBfndList(oldList,newStmt);
> 
> *************************
> 

  	We also notice DO_WHILE_NODE , but we fail to notice FORALL , I'v
merged this changed in the merged version.

> _________________________
> 
> Subject: Bug reports 6, 7
> 
> Try the following program, you will find i is not linked to for_node.
> 
>       program test
>       real x
>       do  i = 1,20
>          a(i) = sin (x)
>       enddo
>       end
> 
> 
> Same problem exist in for_all
> 
>       program tt
>       integer a(10,20)
>       forall(i=1:n,j=1:m)
>         a(i,j) = i+j
>       end forall
>       end
> 
> +++++++++++++++++++++++++
> I have told you the modification about these two yesterday.
> *************************
>

> _________________________
> 
> 
> Subject: bug reports 8,9
> 
> See the following program.
> --------------------------------------------
>       PROGRAM directive_12
> 
>       REAL, DIMENSION(100,100)  ::  A, B
> 
> !HPF$ DYNAMIC                   :: A, B
> 
> 
> !HPF$ DISTRIBUTE S(cyclic) ONTO NP1
> 
> !HPF$ REDISTRIBUTE A(CYCLIC, BLOCK)
> 
> !HPF$ REALIGN B(:,:) WITH A(1::100, 1::100)
> 
> 
>       end
> ---------------------------------------------
> 
> +++++++++++++++++++++++++
> I will ask Zhong Jidong to tell you the modification about this.
> *************************
> 

***************************************************************************
*     Zheng Gengbin                 *                                     *
*                                   *                                     *
*  Dept. of Computer Science        *  Phone:  86-10-2585088              *
*         & Technology              *  Email:                             *
*                                   *      [email-masked]   *
*  Peking University P.R.China      *  Mail:                              *
*                                   *      Room 1077 ,Building 47,        *
*                                   *      Peking University, P.R.China   *
***************************************************************************