===================================================================
@@ -3261,7 +3261,7 @@
if not Is_Aliased_View (Act) then
Error_Msg_NE
("object in prefixed call to& must be aliased "
- & "(RM-2005 4.3.1 (13))",
+ & "(RM 4.1.3 (13 1/2))",
Prefix (Act), Nam);
end if;
===================================================================
@@ -1041,12 +1041,17 @@
if not Is_Aliased_View (P)
and then not In_Instance
and then not In_Inlined_Body
+ and then Comes_From_Source (N)
then
-- Here we have a non-aliased view. This is illegal unless we
-- have the case of Unrestricted_Access, where for now we allow
-- this (we will reject later if expected type is access to an
-- unconstrained array with a thin pointer).
+ -- No need for an error message on a generated access reference
+ -- for the controlling argument in a dispatching call: error will
+ -- be reported when resolving the call.
+
if Aname /= Name_Unrestricted_Access then
Error_Attr_P ("prefix of % attribute must be aliased");
Check_No_Implicit_Aliasing (P);
===================================================================
@@ -7585,7 +7585,7 @@
if not Is_Aliased_View (Obj) then
Error_Msg_NE
("object in prefixed call to & must be aliased "
- & "(RM-2005 4.3.1 (13))", Prefix (First_Actual), Subprog);
+ & "(RM 4.1.3 (13 1/2))", Prefix (First_Actual), Subprog);
end if;
Analyze (First_Actual);