[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  <moy@adacore.com>

gcc/ada/

	* sem_util.adb (Has_Full_Default_Initialization): Consider
	access types as having full default initialization.

From-SVN: r266990
This commit is contained in:
Yannick Moy 2018-12-11 11:10:12 +00:00 committed by Pierre-Marie de Rodat
parent 5fc2669736
commit 0b8ff545ed
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2018-12-11 Yannick Moy <moy@adacore.com>
* sem_util.adb (Has_Full_Default_Initialization): Consider
access types as having full default initialization.
2018-12-11 Yannick Moy <moy@adacore.com> 2018-12-11 Yannick Moy <moy@adacore.com>
* gnat1drv.adb (Gnat1drv): Issue specific error message in * gnat1drv.adb (Gnat1drv): Issue specific error message in

View File

@ -10880,6 +10880,11 @@ package body Sem_Util is
if Is_Scalar_Type (Typ) then if Is_Scalar_Type (Typ) then
return Has_Default_Aspect (Typ); 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 -- An array type is fully default initialized if its element type is
-- scalar and the array type carries aspect Default_Component_Value or -- scalar and the array type carries aspect Default_Component_Value or
-- the element type is fully default initialized. -- the element type is fully default initialized.