[Ada] Reference in Unbounded_String is almost never null
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 27 Oct 2021 08:33:32 +0000 (10:33 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 9 Nov 2021 09:44:48 +0000 (09:44 +0000)
commitf4665dc4fb511a40a104f1986488861fee8b24f7
tree9d42d051fb77340faa716411974bf06426bcd75d
parentadc9410f95e3712f3f2fc4fe0e4a356af605fcd3
[Ada] Reference in Unbounded_String is almost never null

gcc/ada/

* libgnat/a-strunb.adb (Deallocate): Rename Reference_Copy to
Old, to make the code similar to other routines in this package.
(Realloc_For_Chunk): Use a temporary, deallocate the previous
string using a null-allowing copy of the string reference.
gcc/ada/libgnat/a-strunb.adb