aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2014-01-27 16:55:30 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2014-01-27 17:55:30 +0100
commitfcadacf7bf304b9d1533abee137fee659c2aa039 (patch)
treee96c1150ce1daa6cf2fcf6b8557b8793c1e2a587
parent8b4230c823ba1106ebd6bbfcfdea98fc8bbd16d2 (diff)
downloadgcc-fcadacf7bf304b9d1533abee137fee659c2aa039.zip
gcc-fcadacf7bf304b9d1533abee137fee659c2aa039.tar.gz
gcc-fcadacf7bf304b9d1533abee137fee659c2aa039.tar.bz2
sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type has a dynamic predicate...
2014-01-27 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type has a dynamic predicate, generate freeze node for Actual_Subtype at once, because the declaration of the corresponding predicate function will make reference to it. From-SVN: r207145
-rw-r--r--gcc/ada/ChangeLog7
-rw-r--r--gcc/ada/sem_ch6.adb7
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 0873ba4..a57ac28 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,10 @@
+2014-01-27 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
+ has a dynamic predicate, generate freeze node for Actual_Subtype
+ at once, because the declaration of the corresponding predicate
+ function will make reference to it.
+
2014-01-27 Tristan Gingold <gingold@adacore.com>
* exp_ch7.adb, exp_ch9.adb: Adjust comments.
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index eea7ea5..715ca24 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -11491,6 +11491,13 @@ package body Sem_Ch6 is
if Present (First_Stmt) then
Insert_List_Before_And_Analyze (First_Stmt,
Freeze_Entity (Defining_Identifier (Decl), N));
+
+ -- Ditto if the type has a dynamic predicate, because the
+ -- generated function will mention the actual subtype.
+
+ elsif Has_Dynamic_Predicate_Aspect (T) then
+ Insert_List_Before_And_Analyze (Decl,
+ Freeze_Entity (Defining_Identifier (Decl), N));
end if;
if Nkind (N) = N_Accept_Statement