Hello,
I now detected the following problem. The script below runs in gretl 1.9.11, but will cause gretl 2016a to crash (I am using ubuntu 12.04, gretl 2016a is in a virtualbox).

nulldata 10
function series f1(series z)
    series s=1
    loop i=1..1
        s[1]=0
    endloop
    return s
end function
function scalar f2(matrix *my,matrix *ma)
    series z=1
    series f=f1(z)
    return 1
end function
series y=0
matrix my=ones(10,1)
matrix par=1
scalar a=BFGSmax(par,f2(&my,&par))
series yy=0
series x=f1(y)

Oddly, if I add a line between the final two and that new line defines a series (e.g. series yy=0), it will not crash. Additionally, if I comment out s[1]=0 in f1 or comment out loop i=1..1 and the corresponding endloop, it will also not crash.

Thanks,
Pedro