aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2016-04-19 13:02:27 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2016-04-19 15:02:27 +0200
commit681014998bbfc9c4ec501aebbf197a6a78e9c197 (patch)
tree8701952199f69542435b4be28bd054cb5f69fb9b /gcc
parent16e764a7f44bbc29254f041fe0f3064cce65b994 (diff)
downloadgcc-681014998bbfc9c4ec501aebbf197a6a78e9c197.zip
gcc-681014998bbfc9c4ec501aebbf197a6a78e9c197.tar.gz
gcc-681014998bbfc9c4ec501aebbf197a6a78e9c197.tar.bz2
sem_ch6.adb (Possible_Freeze): If the type is an incomplete CW type...
2016-04-19 Eric Botcazou <ebotcazou@adacore.com> * sem_ch6.adb (Possible_Freeze): If the type is an incomplete CW type, then the subprogram must have a delayed freeze. This ensures that the backend can properly recover the full view when elaborating the access subprogram declaration. From-SVN: r235195
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog7
-rw-r--r--gcc/ada/sem_ch6.adb8
2 files changed, 12 insertions, 3 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 08a4ef4..ca023c2 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,10 @@
+2016-04-19 Eric Botcazou <ebotcazou@adacore.com>
+
+ * sem_ch6.adb (Possible_Freeze): If the type is an incomplete
+ CW type, then the subprogram must have a delayed freeze. This
+ ensures that the backend can properly recover the full view when
+ elaborating the access subprogram declaration.
+
2016-04-19 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 17e9fe1..2fec97c 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -5251,8 +5251,9 @@ package body Sem_Ch6 is
-- T is the type of either a formal parameter or of the return type.
-- If T is not yet frozen and needs a delayed freeze, then the
-- subprogram itself must be delayed. If T is the limited view of an
- -- incomplete type the subprogram must be frozen as well, because
- -- T may depend on local types that have not been frozen yet.
+ -- incomplete type (or of a CW type thereof) the subprogram must be
+ -- frozen as well, because T may depend on local types that have not
+ -- been frozen yet.
---------------------
-- Possible_Freeze --
@@ -5269,7 +5270,8 @@ package body Sem_Ch6 is
then
Set_Has_Delayed_Freeze (Designator);
- elsif Ekind (T) = E_Incomplete_Type
+ elsif (Ekind (T) = E_Incomplete_Type
+ or else Ekind (T) = E_Class_Wide_Type)
and then From_Limited_With (T)
then
Set_Has_Delayed_Freeze (Designator);