Browse Source

* initialise cgpara with valid data for the C-style "array of const" para
(necessary for the LLVM backend)

git-svn-id: trunk@40571 -

Jonas Maebe 6 years ago
parent
commit
95171a1e22
1 changed files with 5 additions and 0 deletions
  1. 5 0
      compiler/aarch64/cpupara.pas

+ 5 - 0
compiler/aarch64/cpupara.pas

@@ -400,11 +400,16 @@ unit cpupara;
         if (p.proccalloption in cstylearrayofconst) and
         if (p.proccalloption in cstylearrayofconst) and
            is_array_of_const(paradef) then
            is_array_of_const(paradef) then
           begin
           begin
+            result.size:=OS_NO;
+            result.def:=paradef;
+            result.alignment:=std_param_align;
+            result.intsize:=0;
             paraloc:=result.add_location;
             paraloc:=result.add_location;
             { hack: the paraloc must be valid, but is not actually used }
             { hack: the paraloc must be valid, but is not actually used }
             paraloc^.loc:=LOC_REGISTER;
             paraloc^.loc:=LOC_REGISTER;
             paraloc^.register:=NR_X0;
             paraloc^.register:=NR_X0;
             paraloc^.size:=OS_ADDR;
             paraloc^.size:=OS_ADDR;
+            paraloc^.def:=paradef;
             exit;
             exit;
           end;
           end;