Rosita Wachenchauzer on Fri, 25 Jun 1999 15:58:46 -0300


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

segmentation fault


This program causes a segmentation fault.

rosita

****************************************************

perm(lr,lk, lT)=

\\lT < {lk} in {lr}

{

local(i,j,aux);

j=1;

while((lr[j]-lk[1]),j=j+1;);

i=1;

while(lr[i]-lT,i=i+1;);

if (max(0,i-j) ,

aux=lr[j];

lr[j]=lr[i];

lr[i]=aux);

lr

}

 

qT(ltv, T)=

\\reorders (to Q[{ltv}][T])

{

local(r);

r=reorder;

r=perm(r, ltv, T);

reorder(r);

}

 

foo()=

{

x; lr; lk; lT; i; j; aux; ltv; T; r;

qT([x],T);

reorder

}

***************

? r=foo

%1 = [T, lr, lk, lT, i, j, aux, ltv, x, r]

? type(r)

%2 = *** segmentation fault: bug in GP (please report).