[gcc r11-5407] [Ada] Reuse Is_Access_Object_Type where possible
Pierre-Marie de Rodat
pmderodat@gcc.gnu.org
Thu Nov 26 08:41:35 GMT 2020
https://gcc.gnu.org/g:5af3a22afe8f26c15b7ba798b6c16027baac8b8d
commit r11-5407-g5af3a22afe8f26c15b7ba798b6c16027baac8b8d
Author: Piotr Trojanek <trojanek@adacore.com>
Date: Thu Oct 22 13:19:52 2020 +0200
[Ada] Reuse Is_Access_Object_Type where possible
gcc/ada/
* exp_ch7.adb, exp_util.adb, freeze.adb: Rewrite with
Is_Access_Object_Type.
Diff:
---
gcc/ada/exp_ch7.adb | 3 +--
gcc/ada/exp_util.adb | 3 +--
gcc/ada/freeze.adb | 3 +--
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb
index 411df73328e..55f714c0853 100644
--- a/gcc/ada/exp_ch7.adb
+++ b/gcc/ada/exp_ch7.adb
@@ -2416,8 +2416,7 @@ package body Exp_Ch7 is
if Is_Ignored_Ghost_Entity (Typ) then
null;
- elsif (Is_Access_Type (Typ)
- and then not Is_Access_Subprogram_Type (Typ)
+ elsif (Is_Access_Object_Type (Typ)
and then Needs_Finalization
(Available_View (Designated_Type (Typ))))
or else (Is_Type (Typ) and then Needs_Finalization (Typ))
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index b595de025f5..5d581108d68 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -12401,8 +12401,7 @@ package body Exp_Util is
if Is_Ignored_Ghost_Entity (Typ) then
null;
- elsif ((Is_Access_Type (Typ)
- and then not Is_Access_Subprogram_Type (Typ)
+ elsif ((Is_Access_Object_Type (Typ)
and then Needs_Finalization
(Available_View (Designated_Type (Typ))))
or else (Is_Type (Typ) and then Needs_Finalization (Typ)))
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 24f6c93c06d..19f43852fe3 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -6391,8 +6391,7 @@ package body Freeze is
-- to subprogram and to internal types generated for 'Access
-- references.
- elsif Is_Access_Type (E)
- and then not Is_Access_Subprogram_Type (E)
+ elsif Is_Access_Object_Type (E)
and then Ekind (E) /= E_Access_Attribute_Type
then
-- If a pragma Default_Storage_Pool applies, and this type has no
More information about the Gcc-cvs
mailing list