]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Fix negative value returned by 'Image for array with nonnegative component
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 11 Sep 2024 17:37:08 +0000 (19:37 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 8 Oct 2024 08:37:15 +0000 (10:37 +0200)
commitcfbee1856f5125bbabc28088f62a86f3dee5a159
treee422e67cc0a02f42962b9e8f4abf590128b266e2
parentda2a85ac53cbb9a9162cfb9a6da1c2bd47fc0b1b
ada: Fix negative value returned by 'Image for array with nonnegative component

The problem is that Exp_Put_Image.Build_Elementary_Put_Image_Call uses the
signedness of the base type but the size of the first subtype, hence the
discrepancy between them.

gcc/ada/ChangeLog:
PR ada/115535
* exp_put_image.adb (Build_Elementary_Put_Image_Call): Use the size
of the underlying type to find the support type.
gcc/ada/exp_put_image.adb