From 9af7245ef4729ce82c890ce39bd47e45272a0e0a Mon Sep 17 00:00:00 2001 From: Sebastian Poeplau Date: Thu, 18 Jul 2024 13:57:19 +0200 Subject: [PATCH] Fix another latent bug discovered by GNAT-LLVM This is similar to the previous one, but instead of the default value for String_Data it affects the constant Null_XString. Like before, some fields of Small_String need to be initialized to prevent confusion about the string's size. Issue: eng/toolchain/gnatcoll-core#62 --- core/src/gnatcoll-strings_impl.ads | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/gnatcoll-strings_impl.ads b/core/src/gnatcoll-strings_impl.ads index 05e9fbb7..14de200f 100644 --- a/core/src/gnatcoll-strings_impl.ads +++ b/core/src/gnatcoll-strings_impl.ads @@ -1062,7 +1062,8 @@ package GNATCOLL.Strings_Impl is Null_XString : constant XString := (Ada.Finalization.Controlled with - Data => (Is_Big => False, Small => <>)); + Data => (Is_Big => False, + Small => (Is_Big => False, Size => 0, others => <>))); end Strings;