diff --git a/compiler/defutil.pas b/compiler/defutil.pas index 22e6595a80..30be0ea9b9 100644 --- a/compiler/defutil.pas +++ b/compiler/defutil.pas @@ -871,14 +871,14 @@ implementation if is_ansistring(def) or is_widestring(def) then result := OS_ADDR else - result := OS_NO; + result:=int_cgsize(def.size); end; objectdef : begin if is_class_or_interface(def) then result := OS_ADDR else - result := OS_NO; + result:=int_cgsize(def.size); end; floatdef: result := tfloat2tcgsize[tfloatdef(def).typ]; @@ -908,7 +908,10 @@ implementation end. { $Log$ - Revision 1.22 2005-01-10 22:10:26 peter + Revision 1.23 2005-02-03 17:10:21 peter + * fix win32 small array parameters + + Revision 1.22 2005/01/10 22:10:26 peter * widestring patches from Alexey Barkovoy Revision 1.21 2004/11/01 23:30:11 peter diff --git a/compiler/i386/cgcpu.pas b/compiler/i386/cgcpu.pas index e95d9e67fb..2291566378 100644 --- a/compiler/i386/cgcpu.pas +++ b/compiler/i386/cgcpu.pas @@ -164,10 +164,8 @@ unit cgcpu; { cgpara.size=OS_NO requires a copy on the stack } if use_push(cgpara) then begin - if tcgsize2size[cgpara.size]<>tcgsize2size[size] then - internalerror(200501161); { Record copy? } - if (cgpara.size=OS_NO) then + if (cgpara.size=OS_NO) or (size=OS_NO) then begin cgpara.check_simple_location; len:=align(cgpara.intsize,cgpara.alignment); @@ -177,6 +175,8 @@ unit cgcpu; end else begin + if tcgsize2size[cgpara.size]<>tcgsize2size[size] then + internalerror(200501161); { We need to push the data in reverse order, therefor we use a recursive algorithm } pushdata(cgpara.location,0); @@ -743,7 +743,10 @@ begin end. { $Log$ - Revision 1.64 2005-01-24 22:08:32 peter + Revision 1.65 2005-02-03 17:10:21 peter + * fix win32 small array parameters + + Revision 1.64 2005/01/24 22:08:32 peter * interface wrapper generation moved to cgobj * generate interface wrappers after the module is parsed