Browse Source

Fixed retrieval of size of record

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@7334 8c9fc860-2736-0410-a75d-ab315db34111
negelef 7 years ago
parent
commit
063b60828f
1 changed files with 5 additions and 1 deletions
  1. 5 1
      source/FoxIntermediateBackend.Mod

+ 5 - 1
source/FoxIntermediateBackend.Mod

@@ -9889,7 +9889,11 @@ TYPE
 					(* this is the only case where the destination can be dynamically smaller than the source 
 					(* this is the only case where the destination can be dynamically smaller than the source 
 						in all other cases the dynamic size has to be taken
 						in all other cases the dynamic size has to be taken
 					*)
 					*)
-					MakeMemory(mem, tag, addressType, 0);
+					IF backend.cooperative THEN 
+						MakeMemory(mem, tag, addressType, system.addressSize);
+					ELSE
+						MakeMemory(mem, tag, addressType, 0);
+					END;
 					RETURN mem;
 					RETURN mem;
 				END;
 				END;
 			END;
 			END;