mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-16 12:29:22 +02:00
Merged revisions 1455 via svnmerge from
http://peter@svn.freepascal.org/svn/fpc/trunk r1455 (peter) * check for allowed floatdef operations git-svn-id: branches/fixes_2_0@1498 -
This commit is contained in:
parent
8375c114e5
commit
0234ecba9c
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -5377,6 +5377,7 @@ tests/webtbf/tw4153.pp svneol=native#text/plain
|
|||||||
tests/webtbf/tw4227.pp svneol=native#text/plain
|
tests/webtbf/tw4227.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw4244.pp svneol=native#text/plain
|
tests/webtbf/tw4244.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw4256.pp svneol=native#text/plain
|
tests/webtbf/tw4256.pp svneol=native#text/plain
|
||||||
|
tests/webtbf/tw4445.pp svneol=native#text/plain
|
||||||
tests/webtbf/uw0744.pp svneol=native#text/plain
|
tests/webtbf/uw0744.pp svneol=native#text/plain
|
||||||
tests/webtbf/uw0840a.pp svneol=native#text/plain
|
tests/webtbf/uw0840a.pp svneol=native#text/plain
|
||||||
tests/webtbf/uw0840b.pp svneol=native#text/plain
|
tests/webtbf/uw0840b.pp svneol=native#text/plain
|
||||||
|
@ -1021,7 +1021,8 @@ implementation
|
|||||||
{ if both are floatdefs, conversion is already done before constant folding }
|
{ if both are floatdefs, conversion is already done before constant folding }
|
||||||
else if (ld.deftype=floatdef) then
|
else if (ld.deftype=floatdef) then
|
||||||
begin
|
begin
|
||||||
{ already converted }
|
if not(nodetype in [addn,subn,muln,slashn,equaln,unequaln,ltn,lten,gtn,gten]) then
|
||||||
|
CGMessage3(type_e_operator_not_supported_for_types,node2opstr(nodetype),ld.typename,rd.typename);
|
||||||
end
|
end
|
||||||
|
|
||||||
{ left side a setdef, must be before string processing,
|
{ left side a setdef, must be before string processing,
|
||||||
@ -1783,8 +1784,6 @@ implementation
|
|||||||
function taddnode.first_addfloat: tnode;
|
function taddnode.first_addfloat: tnode;
|
||||||
var
|
var
|
||||||
procname: string[31];
|
procname: string[31];
|
||||||
temp: tnode;
|
|
||||||
power: longint;
|
|
||||||
{ do we need to reverse the result ? }
|
{ do we need to reverse the result ? }
|
||||||
notnode : boolean;
|
notnode : boolean;
|
||||||
begin
|
begin
|
||||||
|
24
tests/webtbf/tw4445.pp
Executable file
24
tests/webtbf/tw4445.pp
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
{ %fail }
|
||||||
|
|
||||||
|
{ Source provided for Free Pascal Bug Report 4445 }
|
||||||
|
{ Submitted by "lito steel" on 2005-10-17 }
|
||||||
|
{ e-mail: litosteel@yahoo.com }
|
||||||
|
{ those are the definitions }
|
||||||
|
const
|
||||||
|
StackMax = 10;
|
||||||
|
var
|
||||||
|
Stack:array[1..StackMax] of double;
|
||||||
|
StackTop: integer = 0;
|
||||||
|
|
||||||
|
{in this procedure the compiler complains}
|
||||||
|
procedure aAND;
|
||||||
|
var a: double;
|
||||||
|
begin
|
||||||
|
a := Stack[StackTop];
|
||||||
|
dec(StackTop);
|
||||||
|
Stack[StackTop] := Stack[StackTop] and a;
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
aand;
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user