From 1daff40e8eb1955ffc5a0cef383088448b16fac0 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sat, 20 Aug 2011 08:04:06 +0000 Subject: [PATCH] * fixed subscripting records containing unicodestrings and other traditionally reference-counted types on the JVM target git-svn-id: branches/jvmbackend@18489 - --- compiler/ncgmem.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/ncgmem.pas b/compiler/ncgmem.pas index 00e9b6c424..a5fe918a15 100644 --- a/compiler/ncgmem.pas +++ b/compiler/ncgmem.pas @@ -295,7 +295,8 @@ implementation { several object types must be dereferenced implicitly } if is_implicit_pointer_object_type(left.resultdef) then begin - if not is_managed_type(left.resultdef) then + if (not is_managed_type(left.resultdef)) or + (target_info.system in systems_garbage_collected_managed_types) then begin { the contents of a class are aligned to a sizeof(pointer) } location_reset_ref(location,LOC_REFERENCE,def_cgsize(resultdef),sizeof(pint));