diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/exp_attr.adb | 10 | ||||
-rw-r--r-- | gcc/ada/exp_ch5.adb | 9 |
2 files changed, 12 insertions, 7 deletions
diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb index ad75453..c3e7fd21 100644 --- a/gcc/ada/exp_attr.adb +++ b/gcc/ada/exp_attr.adb @@ -5675,10 +5675,10 @@ package body Exp_Attr is RT_Subprg_Name : Node_Id; begin - -- Look for the enclosing concurrent type + -- Look for the enclosing protected type Conctyp := Current_Scope; - while not Is_Concurrent_Type (Conctyp) loop + while not Is_Protected_Type (Conctyp) loop Conctyp := Scope (Conctyp); end loop; @@ -5687,13 +5687,15 @@ package body Exp_Attr is -- Generate the actual of the call Subprg := Current_Scope; - while not Present (Protected_Body_Subprogram (Subprg)) loop + while not (Is_Subprogram_Or_Entry (Subprg) + and then Present (Protected_Body_Subprogram (Subprg))) + loop Subprg := Scope (Subprg); end loop; -- Use of 'Priority inside protected entries and barriers (in both -- cases the type of the first formal of their expanded subprogram - -- is Address) + -- is Address). if Etype (First_Entity (Protected_Body_Subprogram (Subprg))) = RTE (RE_Address) diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb index 9a2a110..382302c 100644 --- a/gcc/ada/exp_ch5.adb +++ b/gcc/ada/exp_ch5.adb @@ -2416,10 +2416,10 @@ package body Exp_Ch5 is if Is_Expanded_Priority_Attribute (Ent) then - -- Look for the enclosing concurrent type + -- Look for the enclosing protected type Conctyp := Current_Scope; - while not Is_Concurrent_Type (Conctyp) loop + while not Is_Protected_Type (Conctyp) loop Conctyp := Scope (Conctyp); end loop; @@ -2428,7 +2428,10 @@ package body Exp_Ch5 is -- Generate the first actual of the call Subprg := Current_Scope; - while not Present (Protected_Body_Subprogram (Subprg)) loop + while + not (Is_Subprogram_Or_Entry (Subprg) + and then Present (Protected_Body_Subprogram (Subprg))) + loop Subprg := Scope (Subprg); end loop; |