Commit 68101499 by Eric Botcazou Committed by Arnaud Charlet

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
parent 16e764a7
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> 2016-04-19 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Resolve_Attribute, case 'Access): Freeze * sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
......
...@@ -5251,8 +5251,9 @@ package body Sem_Ch6 is ...@@ -5251,8 +5251,9 @@ package body Sem_Ch6 is
-- T is the type of either a formal parameter or of the return type. -- 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 -- 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 -- subprogram itself must be delayed. If T is the limited view of an
-- incomplete type the subprogram must be frozen as well, because -- incomplete type (or of a CW type thereof) the subprogram must be
-- T may depend on local types that have not been frozen yet. -- frozen as well, because T may depend on local types that have not
-- been frozen yet.
--------------------- ---------------------
-- Possible_Freeze -- -- Possible_Freeze --
...@@ -5269,7 +5270,8 @@ package body Sem_Ch6 is ...@@ -5269,7 +5270,8 @@ package body Sem_Ch6 is
then then
Set_Has_Delayed_Freeze (Designator); 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) and then From_Limited_With (T)
then then
Set_Has_Delayed_Freeze (Designator); Set_Has_Delayed_Freeze (Designator);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment