* fixed bug #7195: use regular type conversions for the results of

fpc_sqr(t)_real

git-svn-id: trunk@4290 -
This commit is contained in:
Jonas Maebe 2006-07-24 07:55:32 +00:00
parent d83a30e4fc
commit 5bf38351e9
3 changed files with 20 additions and 2 deletions

1
.gitattributes vendored
View File

@ -7230,6 +7230,7 @@ tests/webtbs/tw7100.pp svneol=native#text/plain
tests/webtbs/tw7104.pp svneol=native#text/plain
tests/webtbs/tw7143.pp -text
tests/webtbs/tw7161.pp svneol=native#text/plain
tests/webtbs/tw7195.pp svneol=native#text/plain
tests/webtbs/ub1873.pp svneol=native#text/plain
tests/webtbs/ub1883.pp svneol=native#text/plain
tests/webtbs/uw0555.pp svneol=native#text/plain

View File

@ -2485,7 +2485,7 @@ implementation
begin
{ create the call to the helper }
{ on entry left node contains the parameter }
first_sqr_real := ctypeconvnode.create_internal(ccallnode.createintern('fpc_sqr_real',
first_sqr_real := ctypeconvnode.create(ccallnode.createintern('fpc_sqr_real',
ccallparanode.create(left,nil)),resulttype);
left := nil;
end;
@ -2494,7 +2494,7 @@ implementation
begin
{ create the call to the helper }
{ on entry left node contains the parameter }
first_sqrt_real := ctypeconvnode.create_internal(ccallnode.createintern('fpc_sqrt_real',
first_sqrt_real := ctypeconvnode.create(ccallnode.createintern('fpc_sqrt_real',
ccallparanode.create(left,nil)),resulttype);
left := nil;
end;

17
tests/webtbs/tw7195.pp Executable file
View File

@ -0,0 +1,17 @@
{$mode delphi}
Function Test(S : single) : single;
begin
Result := sqrt(s);
end;
Function Test2(S : single) : single;
begin
Result := sqr(s);
end;
begin
writeln(Test(0.123445));
writeln(Test2(0.123445));
end.