File tree Expand file tree Collapse file tree 2 files changed +17
-15
lines changed
testsuite/tests/subp_of_interest_c Expand file tree Collapse file tree 2 files changed +17
-15
lines changed Original file line number Diff line number Diff line change 11"""
22Check that the subprograms of interest mechanism works as expected on a C
3- example.
3+ example. It also acts as a regression testcase as gnatcov used to crash when
4+ instrumenting a source including multiple headers, with at last one of them
5+ not having any coverage obligation.
46"""
57
68import os
Original file line number Diff line number Diff line change @@ -3294,23 +3294,23 @@ package body Instrument.C is
32943294 -- Associate these bit maps to the corresponding CU
32953295
32963296 Set_Bit_Maps (UIC.CUs.Element (SFI), Bit_Maps);
3297+ end ;
3298+ end loop ;
32973299
3298- -- Iterate through the package level body entities
3300+ -- Iterate through the package level body entities
32993301
3300- Remap_Scopes (UIC.Scopes, SCO_Map);
3302+ Remap_Scopes (UIC.Scopes, SCO_Map);
33013303
3302- for C in UIC.Scopes.Iterate loop
3303- declare
3304- CU : constant Created_Unit_Maps.Cursor :=
3305- UIC.CUs.Find (Scopes_In_Files_Map.Key (C));
3306- begin
3307- if Created_Unit_Maps.Has_Element (CU) then
3308- Set_Scope_Entities
3309- (Created_Unit_Maps.Element (CU),
3310- Scopes_In_Files_Map.Element (C).Scope_Entities);
3311- end if ;
3312- end ;
3313- end loop ;
3304+ for C in UIC.Scopes.Iterate loop
3305+ declare
3306+ CU : constant Created_Unit_Maps.Cursor :=
3307+ UIC.CUs.Find (Scopes_In_Files_Map.Key (C));
3308+ begin
3309+ if Created_Unit_Maps.Has_Element (CU) then
3310+ Set_Scope_Entities
3311+ (Created_Unit_Maps.Element (CU),
3312+ Scopes_In_Files_Map.Element (C).Scope_Entities);
3313+ end if ;
33143314 end ;
33153315 end loop ;
33163316 end ;
You can’t perform that action at this time.
0 commit comments