app crash when -Cfsse2 is enabled
Original Reporter info from Mantis: codz
-
Reporter name:
Original Reporter info from Mantis: codz
- Reporter name:
Description:
if you compile this example with -Cfsse2 , you'll get unhandled exception error .
i tried with all fpc verions
----------------
program test;
{$ifdef FPC}{$mode objfpc}{$h+}{$endif}
{$ifdef mswindows}{$apptype console}{$endif}
uses math;
procedure initLut();
const
width = 640;
height = 480;
var
Lut : array[0..width*height-1] of longword;
i,j : longint;
x,y,w,r,a,u,v : single;
iu,iv,iw : longint;
begin
for j:=0 to height -1 do
for i:=0 to width -1 do
begin
x := -1.0 + i*(2.0/width);
y := 1.0 - j*(2.0/height);
r := sqrt( x*x+y*y );
a := arctan2( y, x );
u := 1.0/r;
v := a*(3.0/3.14159);
w := r*r;
if( w>1.0 ) then w := 1.0;
iu := round(u*255.0);
iv := round(v*255.0);
iw := round(w*255.0);
Lut[width*j+i] := ((iw and 255)<<16) or ((iv and 255)<<8) or (iu and 255);
end;
end;
begin
initLut();
end.
Mantis conversion info:
- Mantis ID: 32671
- OS: win7
- OS Build: 32bits
- Platform: windows
- Version: 3.0.2
- Fixed in version: 3.1.1
- Fixed in revision: 38268 (#b421ed0d)