Subject: New verison 1.74

From: Zheng Gengbin <[email-masked]>
Date: Wed, 5 Mar 1997 19:16:44 +0800 (EAT)

This new version include hpfCompiler-1.01 and hpfFrontEnd-1.74 .

	below are some brief descriptions :

1. remove two bugs in unparse , bug example :

	character  a(10)*5="ab"           !! unparse as character a(10)="ab"*5
	parameter  (a(3)=(/ 1 , 2, 3 /))  !! core dump
 
2. remove one bug in hpfsc : when declare implicit none , some times hpfsc
   will core dump .

3. xsageop lib is improved a little .

4. transG is changed .

5. stdpass is also improved . in pass.h , I define a NUMBER_OF_PROC to 
   indicate the procesor number . This will determine the creation of
   the default processors .( This is not new in this version , I just 
   forgot to describe this before )

6. a new pass tof77 is added . this pass is under construction . It perform
   most of the work to translate f90 statement to f77 standard .

Ps , I hope we also call the compiler-1.01 as 1.74 , same of the frontend ,
so that we can easily remeber which one is the newest .

Zheng

---

From: Zheng Gengbin <[email-masked]>
Date: Thu, 6 Mar 1997 10:28:58 +0800 (EAT)

On Wed, 5 Mar 1997, Guansong Zhang wrote:

> How do you find these? Any way, I find a new bug in the new unparse.
>

	Shi Lixia who is working tof77 , have tried many program syntax during
her work and found these bugs .  
	I don't know if my change is correct .

> In testsuite/exampe, the unparse resulte of operate2+.f can be parsed by f90
> previously. But now it cannot.
> 
> The problem seems to be the :: in VAR_DECL. I don't know why in the new
> version, some of them are omitted. This cause problem on things like
> 
> character (20):: string='This uses MIXED case'
> 
> In the file I also found
> 
> + /*   f2c seem cannot parse :: in var_decl statement ?? */
> + DEFNODECODE(VAR_DECL,
>           "%CMNT%PUTTAB%SETFLAG(VARLEN)%SETFLAG(KIND)%LL2%UNSETFLAG(KIND)%IF
> (%LL3 != %NULL), %SETFLAG(,
> + 's',0,BIFNODE)
> 
> f2c can not parse may because it limited itself to f77. But I don't have time
> to follow the link to catch where :: is lost. I think you can finish it easily.
> And please let me know as soon as possible.
> 

	Yes , when usr f77 compiler , :: is not supported . My this change
is mainly for the f2c on our Linux . You can simply uncomment the old one
of VAR_DECL and delete my change .

Zheng

---

From: Zheng Gengbin <[email-masked]>
Date: Thu, 6 Mar 1997 10:32:47 +0800 (EAT)

On Wed, 5 Mar 1997, Guansong Zhang wrote:

> On Mar 5,  7:16pm, Zheng Gengbin wrote:
> Please ask Prof Li more about processor default setting. We can not handle too
> much complicated one. I find there are more than one process array defined in
> the previous version. I don't test this new one yet.
> 

	Ok. But I cannot understand why we must have only one processor array
even with different dimension ?

> Is this pass supposed to work after trans0?
> 

	Yes , I think it should work after all transformation .

Zheng

---

From: Zheng Gengbin <[email-masked]>
Date: Thu, 6 Mar 1997 14:11:34 +0800 (EAT)

On Wed, 5 Mar 1997, Guansong Zhang wrote:

> You don't deal strcasecmp problem this time.
> 

	I remembered the problem now. I think I have added these lines to
the file coefficient.C :

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#ifdef STDC_HEADERS
#include <stdlib.h>
#include <string.h>
#else
#include <strings.h>
#endif

If configure check out gcc is not STDC_HEADERS , it will use strings.h.
I donot know why this happened .

Zheng

---

From: Zheng Gengbin <[email-masked]>
Date: Fri, 7 Mar 1997 19:00:07 +0800 (EAT)

> 
> I have to change it back.
> 
> unparse so far is a f90 unparser. That is why another tof77 is need, right?
> 

	Yes , I think so .

Zheng

---

From: Zheng Gengbin <[email-masked]>
Date: Fri, 7 Mar 1997 19:01:21 +0800 (EAT)

On Thu, 6 Mar 1997, Guansong Zhang wrote:

> 
> The problem is that this function is defined in strings.h on RS6000, which have
> STDC_HEADERS. So I suggest you change to another standard function.
> 

	But why your gcc do not complain this in hpf2dep or hpfsc , which also
use strcasecmp ?

Zheng

---

From: Zheng Gengbin <[email-masked]>
Date: Sat, 8 Mar 1997 10:00:49 +0800 (EAT)

On Fri, 7 Mar 1997, Guansong Zhang wrote:

> On Mar 7,  7:01pm, Zheng Gengbin wrote:
> > Subject: Re: New verison 1.74
> >-- End of excerpt from Zheng Gengbin
> 
> I checked this. It seems that for cc it is OK, but not for xlC.  On RS6000
> there is both string.h and strings.h but this function is defined in strings.h.
> 
> When our package check stdc_headers, rs6000 has and string.h is included, but
> not the strings.h
> 
> Check it on AIX4 please, you will find the problem.
> 

	Then it seems the only way is to add this prototype line :

	extern int strcasecmp(const char*,const char*);

Zheng

---

From: Zheng Gengbin <[email-masked]>
Date: Tue, 11 Mar 1997 09:15:37 +0800 (EAT)

On Mon, 10 Mar 1997, Guansong Zhang wrote:

> On Mar 8, 10:00am, Zheng Gengbin wrote:
> >
> I don't know why this happen after I add this line. Any idea about it?
> 
> ld: 0711-317 ERROR: Undefined symbol: .strcasecmp(const char*,const char*)
> 

I have tried add it like thsi :

extern "C" {
   int strcasecmp(...);
}

it should be ok .

Zheng