This patch improves the debugging information generated by the compiler for task discriminant.
No test available. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-12-05 Javier Miranda <mira...@adacore.com> * exp_ch9.adb (Install_Private_Data_Declarations): Add missing Debug_Info_Needed decoration of internally generated discriminal renaming declaration.
Index: exp_ch9.adb =================================================================== --- exp_ch9.adb (revision 255412) +++ exp_ch9.adb (working copy) @@ -13450,6 +13450,12 @@ Selector_Name => Make_Identifier (Loc, Chars (D)))); Add (Decl); + -- Set debug info needed on this renaming declaration even + -- though it does not come from source, so that the debugger + -- will get the right information for these generated names. + + Set_Debug_Info_Needed (Discriminal (D)); + Next_Discriminant (D); end loop; end;