]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Check validity using signedness from the type and not its base type
authorPiotr Trojanek <trojanek@adacore.com>
Tue, 4 Mar 2025 11:33:34 +0000 (12:33 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 9 Jun 2025 06:32:05 +0000 (08:32 +0200)
commitbba4596132cb75d2892e7475aa67d32e15439c39
tree53735e086857656118eb61e1cd8f090dbecea8eb
parent5069485475173307d5144c60d63651ca3b56b6fb
ada: Check validity using signedness from the type and not its base type

When attribute Valid is applied to a private type, we used the signedness of
its implementation base type which wrongly included negative values.

gcc/ada/ChangeLog:

* exp_attr.adb (Expand_N_Attribute_Reference): When expanding attribute
Valid, use signedness from the validated view, not from its base type.
gcc/ada/exp_attr.adb