https://gcc.gnu.org/g:1bc1fa1160f186b1120bf354f3be3f9b0bf536fb

commit r15-720-g1bc1fa1160f186b1120bf354f3be3f9b0bf536fb
Author: Piotr Trojanek <troja...@adacore.com>
Date:   Fri Mar 22 19:02:00 2024 +0100

    ada: Remove trailing NUL in minimal expansion of Put_Image attribute
    
    When procedure that implements Put_Image attribute emits the type name,
    this name was wrongly followed by a NUL character.
    
    gcc/ada/
    
            * exp_put_image.adb (Build_Record_Put_Image_Procedure): Remove
            trailing NUL from the fully qualified type name.

Diff:
---
 gcc/ada/exp_put_image.adb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/ada/exp_put_image.adb b/gcc/ada/exp_put_image.adb
index c23b4e24354..f5141a56626 100644
--- a/gcc/ada/exp_put_image.adb
+++ b/gcc/ada/exp_put_image.adb
@@ -832,7 +832,9 @@ package body Exp_Put_Image is
                 Parameter_Associations => New_List
                   (Make_Identifier (Loc, Name_S),
                    Make_String_Literal (Loc,
-                     To_String (Fully_Qualified_Name_String (Btyp))))));
+                     To_String
+                       (Fully_Qualified_Name_String
+                          (Btyp, Append_NUL => False))))));
          end if;
       elsif Is_Null_Record_Type (Btyp, Ignore_Privacy => True) then

Reply via email to