Pārlūkot izejas kodu

* fix for Mantis #37779: use init RTTI instead of full RTTI when copying an array
+ added test

git-svn-id: trunk@46915 -

svenbarth 4 gadi atpakaļ
vecāks
revīzija
ff4e1345ff
3 mainītis faili ar 21 papildinājumiem un 1 dzēšanām
  1. 1 0
      .gitattributes
  2. 1 1
      compiler/ninl.pas
  3. 19 0
      tests/webtbs/tw37779.pp

+ 1 - 0
.gitattributes

@@ -18470,6 +18470,7 @@ tests/webtbs/tw37650.pp svneol=native#text/pascal
 tests/webtbs/tw3768.pp svneol=native#text/plain
 tests/webtbs/tw3774.pp svneol=native#text/plain
 tests/webtbs/tw3777.pp svneol=native#text/plain
+tests/webtbs/tw37779.pp svneol=native#text/pascal
 tests/webtbs/tw3778.pp svneol=native#text/plain
 tests/webtbs/tw37780.pp svneol=native#text/plain
 tests/webtbs/tw3780.pp svneol=native#text/plain

+ 1 - 1
compiler/ninl.pas

@@ -4754,7 +4754,7 @@ implementation
             elesizeppn:=cordconstnode.create(tarraydef(paradef).elesize,sinttype,false);
             if is_managed_type(tarraydef(paradef).elementdef) then
               eletypeppn:=caddrnode.create_internal(
-                crttinode.create(tstoreddef(tarraydef(paradef).elementdef),fullrtti,rdt_normal))
+                crttinode.create(tstoreddef(tarraydef(paradef).elementdef),initrtti,rdt_normal))
             else
               eletypeppn:=cordconstnode.create(0,voidpointertype,false);
             maxcountppn:=geninlinenode(in_length_x,false,ppn.left.getcopy);

+ 19 - 0
tests/webtbs/tw37779.pp

@@ -0,0 +1,19 @@
+{ %NORUN }
+
+program tw37779;
+
+type
+  Complex = record
+    re : Double;
+    im : Double;
+  end;
+  TComplexArray = array of Complex;
+  TComplexArrayArray = array of TComplexArray;
+
+var
+  MC: array of array of array of array of TComplexArrayArray;
+
+begin
+  MC := nil;
+  MC := Copy(MC);
+end.