mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 15:28:01 +02:00
Compare commits
3 Commits
ce2136b099
...
8e0b6ced58
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8e0b6ced58 | ||
![]() |
6c4d218b8d | ||
![]() |
68f79e0b82 |
@ -326,8 +326,12 @@ implementation
|
|||||||
else
|
else
|
||||||
reference_reset_symbol(tvref,current_asmdata.WeakRefAsmSymbol(gvs.mangledname,AT_DATA),0,sizeof(pint),[]);
|
reference_reset_symbol(tvref,current_asmdata.WeakRefAsmSymbol(gvs.mangledname,AT_DATA),0,sizeof(pint),[]);
|
||||||
{ Enable size optimization with -Os or PIC code is generated and PIC uses GOT }
|
{ Enable size optimization with -Os or PIC code is generated and PIC uses GOT }
|
||||||
size_opt:=(cs_opt_size in current_settings.optimizerswitches)
|
size_opt:={$if defined(RISCV)}
|
||||||
or ((cs_create_pic in current_settings.moduleswitches) and (tf_pic_uses_got in target_info.flags));
|
true
|
||||||
|
{$else defined(RISCV)}
|
||||||
|
(cs_opt_size in current_settings.optimizerswitches)
|
||||||
|
or ((cs_create_pic in current_settings.moduleswitches) and (tf_pic_uses_got in target_info.flags))
|
||||||
|
{$endif defined(RISCV)};
|
||||||
hreg_tv_rec:=NR_INVALID;
|
hreg_tv_rec:=NR_INVALID;
|
||||||
if size_opt then
|
if size_opt then
|
||||||
begin
|
begin
|
||||||
|
@ -1470,7 +1470,8 @@ type
|
|||||||
TPRResolveAlias = (
|
TPRResolveAlias = (
|
||||||
prraNone, // do not resolve alias
|
prraNone, // do not resolve alias
|
||||||
prraSimple, // resolve alias, but not type alias
|
prraSimple, // resolve alias, but not type alias
|
||||||
prraAlias // resolve alias and type alias
|
prraAlias, // resolve alias and type alias
|
||||||
|
prraHighType
|
||||||
);
|
);
|
||||||
|
|
||||||
TPRProcTypeDescFlag = (
|
TPRProcTypeDescFlag = (
|
||||||
@ -24314,6 +24315,11 @@ begin
|
|||||||
if IsSameType(Arg1Resolved.HiTypeEl,Arg2Resolved.HiTypeEl,prraSimple) then
|
if IsSameType(Arg1Resolved.HiTypeEl,Arg2Resolved.HiTypeEl,prraSimple) then
|
||||||
exit(cExact);
|
exit(cExact);
|
||||||
end
|
end
|
||||||
|
else if ResolveAlias=prraHighType then
|
||||||
|
begin
|
||||||
|
if IsSameType(Arg1Resolved.HiTypeEl,Arg2Resolved.HiTypeEl,prraNone) then
|
||||||
|
exit(cExact);
|
||||||
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
if IsSameType(Arg1Resolved.LoTypeEl,Arg2Resolved.LoTypeEl,prraNone) then
|
if IsSameType(Arg1Resolved.LoTypeEl,Arg2Resolved.LoTypeEl,prraNone) then
|
||||||
@ -29220,8 +29226,8 @@ begin
|
|||||||
begin
|
begin
|
||||||
Param:=TPasElement(Params[i]);
|
Param:=TPasElement(Params[i]);
|
||||||
ComputeElement(Param,ResolvedEl,[rcType]);
|
ComputeElement(Param,ResolvedEl,[rcType]);
|
||||||
ParamsResolved[i]:=ResolvedEl.LoTypeEl;
|
ParamsResolved[i]:=ResolvedEl.HiTypeEl;
|
||||||
if ResolvedEl.LoTypeEl<>TPasType(GenericTemplateList[i]) then
|
if ResolvedEl.HiTypeEl<>TPasType(GenericTemplateList[i]) then
|
||||||
IsSelf:=false;
|
IsSelf:=false;
|
||||||
end;
|
end;
|
||||||
if IsSelf then
|
if IsSelf then
|
||||||
@ -29244,7 +29250,7 @@ begin
|
|||||||
while j>=0 do
|
while j>=0 do
|
||||||
begin
|
begin
|
||||||
if not IsSameType(Item.Params[j],ParamsResolved[j],prraNone)
|
if not IsSameType(Item.Params[j],ParamsResolved[j],prraNone)
|
||||||
and (CheckElTypeCompatibility(Item.Params[j],ParamsResolved[j],prraNone)>cExact) then
|
and (CheckElTypeCompatibility(Item.Params[j],ParamsResolved[j],prraHighType)>cExact) then
|
||||||
break;
|
break;
|
||||||
dec(j);
|
dec(j);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user