+2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * sem_ch12.adb (Check_Private_View): Exchange the private and full view
+ of a designated type when the related access type is an actual in an
+ instance. This ensures that the full view of designated type is
+ available when inside the body of the instance.
+
+2011-08-30 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
+ in a position to be modified, a slice is treated like an indexed
+ component.
+
2011-08-30 Thomas Quinot <quinot@adacore.com>
* s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
end if;
-- For composite types with inconsistent representation exchange
- -- component types accordingly.
+ -- component types accordingly. We exchange the private and full view
+ -- of a designated type when the related access type is an actual in
+ -- an instance. This ensures that the full view of designated type is
+ -- available when inside the body of the instance.
+ -- Is this right ???
elsif Is_Access_Type (T)
and then Is_Private_Type (Designated_Type (T))
and then not Has_Private_View (N)
and then Present (Full_View (Designated_Type (T)))
+ and then Used_As_Generic_Actual (T)
then
Switch_View (Designated_Type (T));
-- or slice is an lvalue, except if it is an access type, where we
-- have an implicit dereference.
- when N_Indexed_Component =>
+ when N_Indexed_Component | N_Slice =>
if N /= Prefix (P)
or else (Present (Etype (N)) and then Is_Access_Type (Etype (N)))
then