aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch13.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-07-18 12:06:00 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-07-18 12:06:00 +0200
commitee4eee0a542378923db1978ac6cee9fe1dfd693e (patch)
tree8944821564e7f6c276ac0ab7ce725cb86bbac4f5 /gcc/ada/exp_ch13.adb
parent3b8481cb9a266deed774ae75d579b7243c3f1cc4 (diff)
downloadgcc-ee4eee0a542378923db1978ac6cee9fe1dfd693e.zip
gcc-ee4eee0a542378923db1978ac6cee9fe1dfd693e.tar.gz
gcc-ee4eee0a542378923db1978ac6cee9fe1dfd693e.tar.bz2
[multiple changes]
2014-07-18 Robert Dewar <dewar@adacore.com> * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting. 2014-07-18 Robert Dewar <dewar@adacore.com> * einfo.adb (Has_Static_Predicate): New function. (Set_Has_Static_Predicate): New procedure. * einfo.ads (Has_Static_Predicate): New flag. * sem_ch13.adb (Is_Predicate_Static): New function (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize (Add_Call): Minor change in Sloc of generated expression (Add_Predicates): Remove setting of Static_Pred, no longer used. * sem_ch4.adb (Has_Static_Predicate): Removed this function, replace by use of the entity flag Has_Static_Predicate_Aspect. * sem_eval.adb (Eval_Static_Predicate_Check): Check real case and issue warning that predicate is not checked for now. * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in spec. * sem_util.adb (Check_Expression_Against_Static_Predicate): Carry out check for any case where there is a static predicate, and output appropriate message. * sinfo.ads: Minor comment corrections. 2014-07-18 Ed Schonberg <schonberg@adacore.com> * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived from an untagged private type whose full view is tagged, the type is marked tagged for layout reasons, but it has no dispatch table, so Set_All_DT_Position must not be called. * exp_ch13.adb: If the freeze node is for a type internal to a record declaration, as is the case for a class-wide subtype of a parent component, the relevant scope is the scope of the enclosing record. From-SVN: r212804
Diffstat (limited to 'gcc/ada/exp_ch13.adb')
-rw-r--r--gcc/ada/exp_ch13.adb11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ada/exp_ch13.adb b/gcc/ada/exp_ch13.adb
index 9500a56..096365c 100644
--- a/gcc/ada/exp_ch13.adb
+++ b/gcc/ada/exp_ch13.adb
@@ -443,6 +443,17 @@ package body Exp_Ch13 is
return;
end if;
+ -- The entity may be a subtype declared for a constrained record
+ -- component, in which case the relevant scope is the scope of
+ -- the record. This happens for class-wide subtypes created for
+ -- a constrained type extension with inherited discriminants.
+
+ if Is_Type (E_Scope)
+ and then Ekind (E_Scope) not in Concurrent_Kind
+ then
+ E_Scope := Scope (E_Scope);
+ end if;
+
-- Remember that we are processing a freezing entity and its freezing
-- nodes. This flag (non-zero = set) is used to avoid the need of
-- climbing through the tree while processing the freezing actions (ie.