* give an internal error in second_int_to_bool() if left.expectloc was not

in [LOC_FLAGS,LOC_JUMP], but it's actual location is one of those

git-svn-id: trunk@29587 -
This commit is contained in:
Jonas Maebe 2015-01-30 19:31:31 +00:00
parent ff25f5c923
commit 2c3aa7cee0

View File

@ -176,6 +176,11 @@ interface
if (nf_explicit in flags) and
not(left.location.loc in [LOC_FLAGS,LOC_JUMP]) then
begin
{ overriding methods must be able to know in advance whether this
code path will be taken by checking expectloc, so they can call
the inherited method in that case }
if left.expectloc in [LOC_FLAGS,LOC_JUMP] then
internalerror(2014122901);
location_copy(location,left.location);
newsize:=def_cgsize(resultdef);
{ change of size? change sign only if location is LOC_(C)REGISTER? Then we have to sign/zero-extend }