From afc80a84cf383fb885ae3366d429a5a0c6ffcd3d Mon Sep 17 00:00:00 2001 From: yury Date: Fri, 12 Feb 2021 11:26:37 +0000 Subject: [PATCH 1/2] * Fixed r48650. git-svn-id: trunk@48657 - --- compiler/ncal.pas | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/compiler/ncal.pas b/compiler/ncal.pas index 25e2aa209c..aa5a7052ad 100644 --- a/compiler/ncal.pas +++ b/compiler/ncal.pas @@ -1367,6 +1367,16 @@ implementation if parasym.varspez in [vs_var,vs_out,vs_constref] then set_unique(left); + if (parasym.varspez=vs_const) and (parasym.vardef.typ=formaldef) then + begin + { compilerprocs never capture the address of their + parameters } + if not(po_compilerproc in aktcallnode.procdefinition.procoptions) then + make_not_regable(left,[ra_addr_regable,ra_addr_taken]) + else + make_not_regable(left,[ra_addr_regable]) + end + else case parasym.varspez of vs_out : begin @@ -1392,16 +1402,6 @@ implementation else make_not_regable(left,[ra_addr_regable]) end; - vs_const: - if parasym.vardef.typ=formaldef then - begin - { compilerprocs never capture the address of their - parameters } - if not(po_compilerproc in aktcallnode.procdefinition.procoptions) then - make_not_regable(left,[ra_addr_regable,ra_addr_taken]) - else - make_not_regable(left,[ra_addr_regable]) - end; else set_varstate(left,vs_read,[vsf_must_be_valid]); end; From 98a748bdd6e3220c299e6cfcbdd64d92e1b335a3 Mon Sep 17 00:00:00 2001 From: florian Date: Fri, 12 Feb 2021 21:39:31 +0000 Subject: [PATCH 2/2] + patch by Dimitrios Chr. Ioannidis: include dwar-3 sections in avr-embedded linker script git-svn-id: trunk@48659 - --- compiler/systems/t_embed.pas | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compiler/systems/t_embed.pas b/compiler/systems/t_embed.pas index dc53666be8..33ac3646c5 100644 --- a/compiler/systems/t_embed.pas +++ b/compiler/systems/t_embed.pas @@ -1074,6 +1074,12 @@ begin Add(' .debug_str 0 : { *(.debug_str) }'); Add(' .debug_loc 0 : { *(.debug_loc) }'); Add(' .debug_macinfo 0 : { *(.debug_macinfo) }'); + Add(' /* DWARF 3 */'); + Add(' .debug_pubtypes 0 : { *(.debug_pubtypes) }'); + Add(' .debug_ranges 0 : { *(.debug_ranges) }'); + Add(' /* DWARF Extension. */'); + Add(' .debug_macro 0 : { *(.debug_macro) }'); + Add('}'); end; {$endif AVR}