gnu /
gcc /
76aac607c7eb53313cfd907a31cee6c5e4f550ae ada: Ada 2022 Image attribute bugs
Two issues. First, the two procedures
Ada.Strings.Text_Buffers.Output_Mapping.[Wide_]Wide_Put each correctly
call Encode, but that call was missing from the corresponding Put procedure.
Second, if a record type contains an array-valued Data component as well as
both a Max_Length and Current_Length component, then the slice
Data (Current_Length + 1 .. Max_Length) should usually be treated like
uninitialized data. It should not participate in things like equality
comparisons. In particular, it should not participate in 'Image results.
To accomplish this, such a type usually ought to have a Put_Image aspect
specification. This Put_Image aspect specification was missing for the
three Super_String types declared in the
Ada.Strings.[Wide_[Wide_]]Superbounded packages.
gcc/ada/
* libgnat/a-sttebu.adb (Put): Add missing call to Encode.
* libgnat/a-strsup.ads: Declare new Put_Image procedure and add
Put_Image aspect specification for type Super_String.
* libgnat/a-strsup.adb (Put_Image): New procedure.
* libgnat/a-stwisu.ads: Declare new Put_Image procedure and add
Put_Image aspect specification for type Super_String.
* libgnat/a-stwisu.adb (Put_Image): New procedure.
* libgnat/a-stzsup.ads: Declare new Put_Image procedure and add
Put_Image aspect specification for type Super_String.
* libgnat/a-stzsup.adb (Put_Image): New procedure.
7 files changed