diff --git a/.gitattributes b/.gitattributes index 4192d0642b..0f93e250c0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -18644,6 +18644,7 @@ tests/webtbs/tw3814.pp svneol=native#text/plain tests/webtbs/tw38145a.pp svneol=native#text/pascal tests/webtbs/tw38145b.pp svneol=native#text/pascal tests/webtbs/tw38151.pp svneol=native#text/pascal +tests/webtbs/tw38201.pp svneol=native#text/pascal tests/webtbs/tw38202.pp svneol=native#text/pascal tests/webtbs/tw3827.pp svneol=native#text/plain tests/webtbs/tw3829.pp svneol=native#text/plain diff --git a/compiler/aarch64/agcpugas.pas b/compiler/aarch64/agcpugas.pas index 01c239b588..35eafef1e7 100644 --- a/compiler/aarch64/agcpugas.pas +++ b/compiler/aarch64/agcpugas.pas @@ -229,7 +229,7 @@ unit agcpugas; begin check_offset(seh.data.offset,512); check_reg(seh.data.reg,R_MMREGISTER,min_mm_reg); - writeword($DA00 or ((getsupreg(seh.data.reg)-min_int_reg) shl 6) or ((seh.data.offset shr 3)-1)); + writeword($DA00 or ((getsupreg(seh.data.reg)-min_mm_reg) shl 6) or ((seh.data.offset shr 3)-1)); end; else internalerror(2020041503); diff --git a/compiler/psub.pas b/compiler/psub.pas index 0421bec131..4506b57bc0 100644 --- a/compiler/psub.pas +++ b/compiler/psub.pas @@ -1136,9 +1136,8 @@ implementation { parasize must be really zero, this means also that no result may be returned in a parameter } and not((current_procinfo.procdef.proccalloption in clearstack_pocalls) and - not(current_procinfo.procdef.generate_safecall_wrapper) and - paramanager.ret_in_param(current_procinfo.procdef.returndef,current_procinfo.procdef)) - {and (para_stack_size=0)} then + not(current_procinfo.procdef.generate_safecall_wrapper) and + paramanager.ret_in_param(current_procinfo.procdef.returndef,current_procinfo.procdef)) then begin { Only need to set the framepointer } framepointer:=NR_STACK_POINTER_REG; diff --git a/rtl/inc/system.inc b/rtl/inc/system.inc index 9b1f7932e1..6dbf9d73fc 100644 --- a/rtl/inc/system.inc +++ b/rtl/inc/system.inc @@ -1327,10 +1327,6 @@ begin errorcode:=word(Errno); erroraddr:=addr; errorbase:=frame; -{$ifdef FPC_HAS_FEATURE_EXCEPTIONS} - if ExceptAddrStack <> nil then - raise TObject(nil) at addr,frame; -{$endif FPC_HAS_FEATURE_EXCEPTIONS} Halt(errorcode); end; diff --git a/tests/webtbs/tw38201.pp b/tests/webtbs/tw38201.pp new file mode 100644 index 0000000000..7cf49f2f13 --- /dev/null +++ b/tests/webtbs/tw38201.pp @@ -0,0 +1,23 @@ +{ %result=201 } +program Test; +{$apptype console} +{$ifdef fpc} +{$mode objfpc} +{$endif fpc} +{$R+} + +var + Arr: array[1..2] of integer; + i: Integer; +begin + i:=5; + try + try + Arr[i] := 1; + except + writeln('Except block'); + end; + finally + writeln('Finally block'); + end; +end.