fcl-passrc: resolver: fixed reading constant $8000000000000000

git-svn-id: trunk@36927 -
This commit is contained in:
Mattias Gaertner 2017-08-16 10:30:34 +00:00
parent 0ddf135404
commit 92510ebe08

View File

@ -2899,6 +2899,7 @@ begin
writeln('TResExprEvaluator.EvalSetExpr Expr=',GetObjName(Expr),' length(ExprArray)=',length(ExprArray));
{$ENDIF}
Result:=TResEvalSet.Create;
if Expr=nil then ;
Value:=nil;
OnlyConstElements:=true;
ok:=false;
@ -3375,9 +3376,12 @@ begin
writeln('TResExprEvaluator.Eval Int=',Int,' Value="',TPrimitiveExpr(Expr).Value,'"');
{$ENDIF}
if (Int<0) and (Pos('-',TPrimitiveExpr(Expr).Value)<1) then
RaiseInternalError(20170802141254,'bug in FPC str()');
Result:=TResEvalInt.CreateValue(Int);
exit;
// FPC str() converts $8000000000000000 to a negative int64 -> ignore
else
begin
Result:=TResEvalInt.CreateValue(Int);
exit;
end;
end;
// try MaxPrecUInt
val(TPrimitiveExpr(Expr).Value,UInt,Code);