* convert int64 properly to c-bools, resolves #12614

git-svn-id: trunk@12120 -
This commit is contained in:
florian 2008-11-16 13:27:59 +00:00
parent d423812928
commit 706f8085f4
4 changed files with 31 additions and 7 deletions

1
.gitattributes vendored
View File

@ -8624,6 +8624,7 @@ tests/webtbs/tw1251b.pp svneol=native#text/plain
tests/webtbs/tw1255.pp svneol=native#text/plain
tests/webtbs/tw12575.pp svneol=native#text/plain
tests/webtbs/tw12597.pp svneol=native#text/plain
tests/webtbs/tw12614.pp svneol=native#text/plain
tests/webtbs/tw1269.pp svneol=native#text/plain
tests/webtbs/tw1275.pp svneol=native#text/plain
tests/webtbs/tw1279.pp svneol=native#text/plain

View File

@ -245,15 +245,15 @@ implementation
else
begin
if cdo_explicit in cdoptions then
doconv:=basedefconvertsexplicit[basedeftbl[torddef(def_from).ordtype],basedeftbl[torddef(def_to).ordtype]]
doconv:=basedefconvertsexplicit[basedeftbl[torddef(def_from).ordtype],basedeftbl[torddef(def_to).ordtype]]
else
doconv:=basedefconvertsimplicit[basedeftbl[torddef(def_from).ordtype],basedeftbl[torddef(def_to).ordtype]];
doconv:=basedefconvertsimplicit[basedeftbl[torddef(def_from).ordtype],basedeftbl[torddef(def_to).ordtype]];
if (doconv=tc_not_possible) then
eq:=te_incompatible
else if (not is_in_limit(def_from,def_to)) then
{ "punish" bad type conversions :) (JM) }
eq:=te_convert_l3
else
else
eq:=te_convert_l1;
end;
end;

View File

@ -2,7 +2,7 @@
<CONFIG>
<ProjectOptions>
<PathDelim Value="\"/>
<Version Value="5"/>
<Version Value="6"/>
<General>
<Flags>
<MainUnitHasUsesSectionForAllUnits Value="False"/>
@ -26,7 +26,7 @@
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<Units Count="2">
<Units Count="4">
<Unit0>
<Filename Value="pp.pas"/>
<IsPartOfProject Value="True"/>
@ -37,10 +37,19 @@
<IsPartOfProject Value="True"/>
<UnitName Value="aasmcpu"/>
</Unit1>
<Unit2>
<Filename Value="arm\aoptcpu.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="aoptcpu"/>
</Unit2>
<Unit3>
<Filename Value="aopt.pas"/>
<IsPartOfProject Value="True"/>
</Unit3>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
<Version Value="8"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="arm\pp"/>
@ -52,7 +61,6 @@
</SearchPaths>
<Parsing>
<SyntaxOptions>
<D2Extensions Value="False"/>
<CStyleOperator Value="False"/>
<AllowLabel Value="False"/>
<CPPInline Value="False"/>

15
tests/webtbs/tw12614.pp Normal file
View File

@ -0,0 +1,15 @@
{$mode objfpc}
program testb;
Function IntRes : int64;
begin
Result:=3;
end;
Var
B : WordBool;
begin
B:=WordBool(IntRes);
end.