diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-06-14 14:23:34 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-06-14 14:23:34 +0200 |
commit | 4969efdf7d92bc0a018a664fccc6d715e9de0d9f (patch) | |
tree | 44902dbb1fb8d8b10c405d92dde10e67b48d26df /gcc/ada/sem_ch9.adb | |
parent | 44900051ac48c87701dbbf3d485386013d56c97c (diff) | |
download | gcc-4969efdf7d92bc0a018a664fccc6d715e9de0d9f.tar.gz |
[multiple changes]
2016-06-14 Tristan Gingold <gingold@adacore.com>
* einfo.adb, einfo.ads (Has_Timing_Event,
Set_Has_Timing_Event): Add Has_Timing_Event flag.
(Write_Entity_Flags): Display * sem_util.ads, sem_util.adb:
(Propagate_Type_Has_Flags): New procedure to factorize code.
* exp_ch3.adb (Expand_Freeze_Array_Type,
Expand_Freeze_Record_Type): Call Propagate_Type_Has_Flags.
* sem_ch3.adb (Access_Type_Decalaration): Initialize
Has_Timing_Event flag. (Analyze_Object_Declaration):
Move code that check No_Local_Timing_Events near
the code that check No_Local_Protected_Objects.
(Analyze_Private_Extension_Declaration, Array_Type_Declaration)
(Build_Derived_Type, Copy_Array_Base_Type_Attributes,
Process_Full_View) (Record_Type_Definition): Call
Propagate_Type_Has_Flags.
* sem_ch4.adb (Analyze_Allocator): Check No_Local_Timing_Events.
* sem_ch7.adb (New_Private_Type): Set Has_Timing_Event on the
Timing_Event type.
(Uninstall_Declaration): Call Propagate_Type_Has_Flags.
* sem_ch9.adb (Analyze_Protected_Definition): Call
Propagate_Type_Has_Flags.
2016-06-14 Arnaud Charlet <charlet@adacore.com>
* sem.ads: Minor style fix.
From-SVN: r237434
Diffstat (limited to 'gcc/ada/sem_ch9.adb')
-rw-r--r-- | gcc/ada/sem_ch9.adb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/gcc/ada/sem_ch9.adb b/gcc/ada/sem_ch9.adb index 442a71d9f08..adfd27d0e98 100644 --- a/gcc/ada/sem_ch9.adb +++ b/gcc/ada/sem_ch9.adb @@ -1937,16 +1937,8 @@ package body Sem_Ch9 is while Present (E) loop if Ekind_In (E, E_Function, E_Procedure) then Set_Convention (E, Convention_Protected); - - elsif Is_Task_Type (Etype (E)) - or else Has_Task (Etype (E)) - then - Set_Has_Task (Current_Scope); - - elsif Is_Protected_Type (Etype (E)) - or else Has_Protected (Etype (E)) - then - Set_Has_Protected (Current_Scope); + else + Propagate_Type_Has_Flags (Current_Scope, Etype (E)); end if; Next_Entity (E); |