From: Tristan Gingold Date: Tue, 20 Oct 2015 12:15:46 +0000 (+0000) Subject: s-rident.ads: No_Task_At_Interrupt_Priority: New restriction. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6bf8c157bf8121f26182fc05182ec6c0c6ecf9e0;p=gcc.git s-rident.ads: No_Task_At_Interrupt_Priority: New restriction. 2015-10-20 Tristan Gingold * s-rident.ads: No_Task_At_Interrupt_Priority: New restriction. * sem_prag.adb (Analyze_Pragma): Check the restriction. * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check the restriction (for aspects). From-SVN: r229063 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 9830861868e..3461bd86259 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,10 @@ +2015-10-20 Tristan Gingold + + * s-rident.ads: No_Task_At_Interrupt_Priority: New restriction. + * sem_prag.adb (Analyze_Pragma): Check the restriction. + * sem_ch13.adb (Analyze_Attribute_Definition_Clause): + Check the restriction (for aspects). + 2015-10-20 Gary Dismukes * sem_prag.adb: Minor reformatting. diff --git a/gcc/ada/s-rident.ads b/gcc/ada/s-rident.ads index 4fdb6aca420..4fd71eb9bad 100644 --- a/gcc/ada/s-rident.ads +++ b/gcc/ada/s-rident.ads @@ -144,6 +144,7 @@ package System.Rident is No_Streams, -- GNAT No_Task_Allocators, -- (RM D.7(7)) No_Task_Attributes_Package, -- GNAT + No_Task_At_Interrupt_Priority, -- GNAT No_Task_Hierarchy, -- (RM D.7(3), H.4(3)) No_Task_Termination, -- GNAT (Ravenscar) No_Tasking, -- GNAT diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 820a2d1cb4c..7b5e1b84a15 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -5266,6 +5266,12 @@ package body Sem_Ch13 is (Expr, RTE (RE_Interrupt_Priority)); Uninstall_Discriminants_And_Pop_Scope (U_Ent); + + -- Check the No_Task_At_Interrupt_Priority restriction + + if Is_Task_Type (U_Ent) then + Check_Restriction (No_Task_At_Interrupt_Priority, N); + end if; end if; else diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index be5c37ba85e..46fbbe406fb 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -15566,6 +15566,12 @@ package body Sem_Prag is Check_Duplicate_Pragma (Ent); Record_Rep_Item (Ent, N); + + -- Check the No_Task_At_Interrupt_Priority restriction + + if Nkind (P) = N_Task_Definition then + Check_Restriction (No_Task_At_Interrupt_Priority, N); + end if; end if; end Interrupt_Priority;