Subject: Re: implied do

From: Zheng Gengbing <[email-masked]>
Date: Fri, 17 May 1996 09:49:13 +0800 (EAT)

On Thu, 16 May 1996, Guansong Zhang wrote:

> I can not figure out how IMPLIED_DO is defined. Looks at the following:
> 
> ++++++++++++++++++++++++++++++++++++++
>       program pivot
>           write (unit=6) (psi(i,j), j=1,NN / 4)
>       a = (/ (i,i=1,m) /)
>       end
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       program pivot
>       write (unit=6) (psi(i,j), j=1,NN / 4)
>       a = (/ (i, 1,m) /)
>       end program
> 
> 
> ======================================
> 
> Is it mean implied_do is different at different place, or a bug? I am not sure
> about this.

	It is a bug , I think . Although we defined  unimously in AST draft
of ac_implied_do and io_implied_do , HIT implemented differently. 

	But , I feel that the io_implied_do implemented by HIT is better .
So I decide to use the same defintion to ac_implied_do , so now we have
a unimous though different one from the draft :

               IMPLIED_DO
                  |
             +---------+
             |         |
       expr_list     DDOT
                       |
                  +-----------+
                  |           |
               RANGE_OP

 instead of :

              IMPLIED_DO
                 |
          +---------------+
                          |
                      EXPR_LIST
                          |
                     +----------+
                     |          |
                            EXPR_LIST

which is defined in AST draft V1.0 .

	still , there is a bug in io_implied_do implemented by HIT , the 
impiled_do_variable should not contained in llnd DDOT but in IMPLIED_DO . 

	Now I have done the change above. You need to improve your unparser
too.

***************************************************************************
*     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   *
***************************************************************************