]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Spurious predicate check at default initialization
authorJavier Miranda <miranda@adacore.com>
Tue, 2 Sep 2025 12:15:45 +0000 (12:15 +0000)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 23 Sep 2025 13:01:12 +0000 (15:01 +0200)
commitfde2299c3affbaa278d47e2be6975445e5299982
tree7fbaadef64cd320cf0790e5a23750c9aaa5b93fe
parentdcb84365a6821f3902dc25b8422b0c08f9055870
ada: Spurious predicate check at default initialization

For an object created by an object_declaration with no explicit
initialization expression, if the type of the object is a record
type (or a private record type) with no components and a dynamic
predicate, then no predicate check must be performed at runtime
(RM 3.2.4(31/5)).

gcc/ada/ChangeLog:

* sem_util.adb (Is_Partially_Initialized_Type): Return False
for record types with no components.
gcc/ada/sem_util.adb