aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2020-10-22 13:19:52 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2020-11-26 03:39:43 -0500
commit5af3a22afe8f26c15b7ba798b6c16027baac8b8d (patch)
tree1e2211c411d49c6d2664deb7fd9c1bd48d5e392a /gcc
parent5f7ee280184215b592e945e906902da92f3428e8 (diff)
downloadgcc-5af3a22afe8f26c15b7ba798b6c16027baac8b8d.zip
gcc-5af3a22afe8f26c15b7ba798b6c16027baac8b8d.tar.gz
gcc-5af3a22afe8f26c15b7ba798b6c16027baac8b8d.tar.bz2
[Ada] Reuse Is_Access_Object_Type where possible
gcc/ada/ * exp_ch7.adb, exp_util.adb, freeze.adb: Rewrite with Is_Access_Object_Type.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/exp_ch7.adb3
-rw-r--r--gcc/ada/exp_util.adb3
-rw-r--r--gcc/ada/freeze.adb3
3 files changed, 3 insertions, 6 deletions
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb
index 411df73..55f714c 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 b595de0..5d58110 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 24f6c93..19f4385 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