aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_util.ads
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-07-02 10:07:55 +0200
committerMarc Poulhiès <poulhies@adacore.com>2023-07-18 15:11:46 +0200
commitf31a63438347c628a64257cb909a400cbd5388e3 (patch)
treecd2df5ff26147bbac88f8e61df6482aadc54a4a6 /gcc/ada/sem_util.ads
parentbd93ef7f1a178079c6cdaccdf953f79a3365b028 (diff)
ada: Fix Valid_Scalars attribute applied to types from limited with
The attribute is wrongly computed as always True because, unlike for e.g. private types, Validated_View does not look through the limited view. gcc/ada/ * sem_util.ads (Validated_View): Document enhanced behavior. * sem_util.adb (Validated_View): Return the nonlimited view, if any, of types coming from a limited with.
Diffstat (limited to 'gcc/ada/sem_util.ads')
-rw-r--r--gcc/ada/sem_util.ads4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads
index 3751fb73702..7fc77de2b8a 100644
--- a/gcc/ada/sem_util.ads
+++ b/gcc/ada/sem_util.ads
@@ -3331,8 +3331,8 @@ package Sem_Util is
function Validated_View (Typ : Entity_Id) return Entity_Id;
-- Obtain the "validated view" of arbitrary type Typ which is suitable for
-- verification by attribute 'Valid_Scalars. This view is the type itself
- -- or its full view while stripping away concurrency, derivations, and
- -- privacy.
+ -- or its full view or nonlimited view, while stripping away concurrency,
+ -- derivations, and privacy.
function Visible_Ancestors (Typ : Entity_Id) return Elist_Id;
-- [Ada 2012:AI-0125-1]: Collect all the visible parents and progenitors