[Ada] Better error message for aliased formal and atomic actual
2019-12-13 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_res.adb (Resolve_Actuals): Give canonical error for illegal case of atomic/volatile parameter also if the formal is aliased. From-SVN: r279364
This commit is contained in:
parent
a35c1b077e
commit
e1e1e53a48
@ -1,3 +1,9 @@
|
||||
2019-12-13 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* sem_res.adb (Resolve_Actuals): Give canonical error for
|
||||
illegal case of atomic/volatile parameter also if the formal is
|
||||
aliased.
|
||||
|
||||
2019-12-13 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* sem_util.ads (Is_Atomic_Object): Mention relevant RM clauses.
|
||||
|
@ -4717,7 +4717,7 @@ package body Sem_Res is
|
||||
|
||||
-- Check bad case of atomic/volatile argument (RM C.6(12))
|
||||
|
||||
if Is_By_Reference_Type (Etype (F))
|
||||
if (Is_By_Reference_Type (Etype (F)) or else Is_Aliased (F))
|
||||
and then Comes_From_Source (N)
|
||||
then
|
||||
if Is_Atomic_Object (A)
|
||||
|
Loading…
Reference in New Issue
Block a user