]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Fix bogus error about null exclusion for designated type with multiple views
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 7 Nov 2025 12:10:00 +0000 (13:10 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 18 Nov 2025 15:05:10 +0000 (16:05 +0100)
commitb4c2d77cacf9e6ae87ec23552771d2eaef8415d6
tree4f7f1023f6b49549663d8308362681ebf565f63d
parent6d6fcceb2db0d8564d42d6b147c8dbb326fcb6fd
ada: Fix bogus error about null exclusion for designated type with multiple views

It comes from the new legality check retroactively introduced by AI12-0289,
but the implementation is fooled by the presence of both an incomplete and
a partial view for a tagged type.

gcc/ada/ChangeLog:

PR ada/111433
* sem_util.ads (Incomplete_Or_Partial_View): Add Partial_Only formal
parameter.
* sem_util.adb (Incomplete_Or_Partial_View): Likewise.  Do not look
for an incomplete view if it is set to True.
* sem_ch6.adb (Check_Conformance.Null_Exclusions_Match): Pass True
for Partial_Only in the call to Incomplete_Or_Partial_View.
gcc/ada/sem_ch6.adb
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads