Error in is_lhs()!!!

David Heine dlheine@truk.Stanford.EDU
Sat, 23 Jan 1999 14:06:42 -0800 (PST)


> Hi, 
> I have found a subtle error in is_lhs() method  while I was working in
> an implementation of appbt benchmark.
> I have isolated the piece of code that caused the error in the C program
> that follows:
> 
> /*This piece of code can reproduce  the error*/
...
> /*END of code to reproduce the error*/
> 
> 
> To reproduce the error, just runs the prog3 from suifcookbook. It will
> call is_lhs an given the following output:
> 
> miami% scc -.spd bug.c
> miami% prog3 bug.spd
> =======update======= 
> For loop k (Outermost)
> For loop j 
> For loop i 
> For loop m 
>  
> **** Program: prog3
> **** Assertion failure in file "arrayinfo.cc" at line 257  (module
> libuseful.a)
> **** False expression: i->dst_op().is_instr()
> Abort
> miami% 
> 
> 
> Anybody knows  how to fix it?

I just tried this on our internal version and I get no seg-fault.
It gave the following output:
=======update======= 
For loop k (Outermost)
For loop j 
For loop i 
For loop m 
LHS:
RHS:
z_a[k-1]
y_a[j-1]
x_a[i-1]
GMEM[m+offset`mod by: i']
GMEM[m+offset`mod by: i']
=======main======= 

This would suggest that one of the fixes that was released in
ftp://suif.stanford.edu/pub/suif/alpha/basesuif-2.0.0.alpha.784.tar.Z
in the useful or suif1 directores might solve the problem.

-David