diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-27 13:54:52 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-27 13:54:52 +0000 |
commit | e1dc3134843fff33c3ba0aaf94423aafcface1bd (patch) | |
tree | 4f442f9f47f7101c623fbfb3e03dc8ea8420e42c /gcc/ada/exp_ch9.adb | |
parent | 556c393f6d39bd35dc8762d00a7b652acb03d369 (diff) | |
download | gcc-e1dc3134843fff33c3ba0aaf94423aafcface1bd.tar.gz |
2004-10-26 Thomas Quinot <quinot@act-europe.fr>
Ed Schonberg <schonberg@gnat.com>
* sem_util.adb (Is_Aliased_View): Defend against the case where this
subprogram is called with a parameter that is not an object name. This
situation arises for some cases of illegal code, which is diagnosed
later, and in this case it is wrong to call Is_Aliased, as that might
cause a compiler crash.
(Explain_Limited_Type): Refine previous fix to include
inherited components of derived types, to provide complete information.
* exp_ch9.adb (Set_Privals): Set the Ekind of the actual object that
is the prival for a protected object.
It is necessary to mark this entity as a variable, in addition to
flagging it as Aliased, because Sem_Util.Is_Aliased_View has been
modified to avoid checking the Aliased flag on entities that are not
objects. (Checking that flag for non-objects is erroneous and could
lead to a compiler crash).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89674 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch9.adb')
-rw-r--r-- | gcc/ada/exp_ch9.adb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index 133bf555b9d..fc8e73020e8 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -8745,6 +8745,7 @@ package body Exp_Ch9 is end loop; P_Subtype := Etype (Defining_Identifier (Obj_Decl)); + Set_Ekind (Priv, E_Variable); Set_Etype (Priv, P_Subtype); Set_Is_Aliased (Priv); Set_Object_Ref (Body_Ent, Priv); |