From: pmderodat Date: Tue, 11 Dec 2018 11:10:12 +0000 (+0000) Subject: [Ada] Support access types in GNATprove X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84b008ce675b6e62c64812676897d470cd7a5c9d;p=thirdparty%2Fgcc.git [Ada] Support access types in GNATprove SPARK RM has been updated to support access types in SPARK. Part of this support is that now SPARK RM 3.1 lists access types as having full default initialization. Now updated. There is no impact on compilation. 2018-12-11 Yannick Moy gcc/ada/ * sem_util.adb (Has_Full_Default_Initialization): Consider access types as having full default initialization. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266990 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 003bea4501d1..4713510d848d 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-12-11 Yannick Moy + + * sem_util.adb (Has_Full_Default_Initialization): Consider + access types as having full default initialization. + 2018-12-11 Yannick Moy * gnat1drv.adb (Gnat1drv): Issue specific error message in diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index cf13c246d4b8..c5a194486bce 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -10880,6 +10880,11 @@ package body Sem_Util is if Is_Scalar_Type (Typ) then return Has_Default_Aspect (Typ); + -- An access type is fully default initialized by default + + elsif Is_Access_Type (Typ) then + return True; + -- An array type is fully default initialized if its element type is -- scalar and the array type carries aspect Default_Component_Value or -- the element type is fully default initialized.