From: Eric Botcazou Date: Fri, 13 Dec 2019 09:05:23 +0000 (+0000) Subject: [Ada] Better error message for aliased formal and atomic actual X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e1e1e53a4861f5addee43088de14dadf47892f23;p=gcc.git [Ada] Better error message for aliased formal and atomic actual 2019-12-13 Eric Botcazou 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 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index a1f971ab748..7282db42a2d 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2019-12-13 Eric Botcazou + + * 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 * sem_util.ads (Is_Atomic_Object): Mention relevant RM clauses. diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 54d47286605..1c5ae36e0d2 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -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)