From c3f22aae94c5993d13bbb16371a746cf6c66a6e4 Mon Sep 17 00:00:00 2001 From: florian Date: Sat, 3 Mar 2007 19:51:34 +0000 Subject: [PATCH] * fixed set+range on big endian systems git-svn-id: trunk@6704 - --- compiler/nadd.pas | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/compiler/nadd.pas b/compiler/nadd.pas index 891f2888ca..968104f357 100644 --- a/compiler/nadd.pas +++ b/compiler/nadd.pas @@ -1086,7 +1086,17 @@ implementation inserttypeconv(right,tsetdef(ld).elementdef); end else - CGMessage(type_e_mismatch) + CGMessage(type_e_mismatch); + { ranges require normsets on big endian system } + if (target_info.endian=endian_big) and + (tsetdef(ld).size<>32) and + (rt=setelementn) and + assigned(tsetelementnode(right).right) then + begin + { generate a temporary normset def, it'll be destroyed + when the symtable is unloaded } + inserttypeconv(left,tsetdef.create(tsetdef(ld).elementdef,255)); + end; end else begin @@ -1102,8 +1112,7 @@ implementation else inserttypeconv(right,left.resultdef); end; - end; - + end; end { pointer comparision and subtraction } else if ( @@ -2447,6 +2456,7 @@ implementation ccallparanode.create(ctemprefnode.create(temp), ccallparanode.create(left,nil))))) ); + { remove reused parts from original node } tsetelementnode(right).right:=nil; tsetelementnode(right).left:=nil;