mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-16 05:30:37 +01:00
* 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:
parent
d83a30e4fc
commit
5bf38351e9
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
||||
@ -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
17
tests/webtbs/tw7195.pp
Executable 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.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user