I get an error message on compiling this bit of code. Windows10 & 7, FPC 3.0.4. Can anybody test and confirm this please ? Seems to be a problem with AVX instruction set and optimisation for register variables. CPU-Z reports that my machine supports the AVX instruction set, so I suspect this is a bug.
Compile with: fpc mist.pas -CfSSE2 -CpCOREAVX -Mobjfpc -O2 -Twin32
//fpc mist.pas -CfSSE2 -CpCOREAVX -Mobjfpc -O2 -Twin32
type float = single;
TVector = array of float;
TMatrix = array of TVector;
function mtx_cholesky (const a:TMatrix):TMatrix;
var l : TMatrix;
c : float;
begin
c := 3;
c := sqrt(c); //-> invalid combination of opcode and operand
SetLength (l,3,3);
l[0,0]:=c;
result:=l;
end;
begin
end.