s-rident.ads: No_Task_At_Interrupt_Priority: New restriction.
authorTristan Gingold <gingold@adacore.com>
Tue, 20 Oct 2015 12:15:46 +0000 (12:15 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 20 Oct 2015 12:15:46 +0000 (14:15 +0200)
2015-10-20  Tristan Gingold  <gingold@adacore.com>

* 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

gcc/ada/ChangeLog
gcc/ada/s-rident.ads
gcc/ada/sem_ch13.adb
gcc/ada/sem_prag.adb

index 9830861868e2a8ec559326fb748e6277953ce5cd..3461bd862591f8a595053202ca68941506604c3b 100644 (file)
@@ -1,3 +1,10 @@
+2015-10-20  Tristan Gingold  <gingold@adacore.com>
+
+       * 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  <dismukes@adacore.com>
 
        * sem_prag.adb: Minor reformatting.
index 4fdb6aca420dfb89e186832df989e26b6afab5c2..4fd71eb9badd2eb4f35dc009fdf651140fa23047 100644 (file)
@@ -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
index 820a2d1cb4ccea627ccd145309a14646a7102ac4..7b5e1b84a151948eb98b8d95c12bbf9371fc1b00 100644 (file)
@@ -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
index be5c37ba85eafcd4f5080f159c8c2ab56693f5b7..46fbbe406fbf05656840251da858038e1c126622 100644 (file)
@@ -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;