mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 00:19:25 +02:00
+ bug0309
This commit is contained in:
parent
4d6b81e55e
commit
090c46c35b
31
bugs/bug0309.pp
Normal file
31
bugs/bug0309.pp
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{ This code was first written by Florian
|
||||||
|
to test the GDB output for FPU
|
||||||
|
he thought first that FPU output was wrong
|
||||||
|
but in fact it is a bug in FPC :( }
|
||||||
|
program bug0309;
|
||||||
|
|
||||||
|
var
|
||||||
|
a,b : double;
|
||||||
|
|
||||||
|
begin
|
||||||
|
asm
|
||||||
|
fninit;
|
||||||
|
end;
|
||||||
|
a:=1;
|
||||||
|
b:=2;
|
||||||
|
asm
|
||||||
|
movl $1,%eax
|
||||||
|
fldl a
|
||||||
|
fldl b
|
||||||
|
fadd
|
||||||
|
fstpl a
|
||||||
|
end;
|
||||||
|
{ the above generates wrong code in binary writer
|
||||||
|
fldl is replaced by flds !!
|
||||||
|
if using -alt option to force assembler output
|
||||||
|
all works correctly PM }
|
||||||
|
writeln('a = ',a,' should be 3');
|
||||||
|
a:=1.0;
|
||||||
|
a:=a+b;
|
||||||
|
writeln('a = ',a,' should be 3');
|
||||||
|
end.
|
@ -398,3 +398,4 @@ bug0299.pp passing Array[0..1] of char by value to proc leads to problems
|
|||||||
bug0305.pp Finally is not handled correctly after inputting 0
|
bug0305.pp Finally is not handled correctly after inputting 0
|
||||||
bug0307.pp "with object_type" doesn't work correctly!
|
bug0307.pp "with object_type" doesn't work correctly!
|
||||||
bug0308a.pp problem with objects that don't have VMT nor variable fields
|
bug0308a.pp problem with objects that don't have VMT nor variable fields
|
||||||
|
bug0309.pp problem with ATT assembler written by bin writer
|
||||||
|
Loading…
Reference in New Issue
Block a user