+2013-07-05 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_prag.adb (Analyze_PPC_In_Decl_Part): For a class-wide
+ condition, when replacing the name of a formal by a conversion
+ to the class-wide type, exempt selector names that appear in
+ parameter associations.
+
2013-06-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/ada-tree.h (DECL_BY_DOUBLE_REF_P): Delete.
-- accessparameter of type access-to-T is interpreted as having
-- type access-to-T'Class. This ensures the expression is well-
-- defined for a primitive subprogram of a type descended from T.
+ -- Note that this replacement is not done for selector names in
+ -- parameter associations. These carry an entity for reference
+ -- purposes, but they semantically they are just identifiers.
-------------
-- Get_ACW --
and then Present (Entity (N))
and then Is_Formal (Entity (N))
and then Nkind (Parent (N)) /= N_Type_Conversion
+ and then
+ (Nkind (Parent (N)) /= N_Parameter_Association
+ or else N /= Selector_Name (Parent (N)))
then
if Etype (Entity (N)) = T then
Typ := Class_Wide_Type (T);