summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch9.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-17 09:20:50 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-17 09:20:50 +0000
commit30ab103b01a95bb8ddde392662a8421715ecacfb (patch)
treeac2ce43d8b87906a4f1c44c43fc8feeb03aaee9a /gcc/ada/sem_ch9.adb
parent6a781f8ebbee811d36e45bef81b26adee83f2fb4 (diff)
downloadgcc-30ab103b01a95bb8ddde392662a8421715ecacfb.tar.gz
2014-10-17 Robert Dewar <dewar@adacore.com>
* exp_ch9.adb (Expand_N_Task_Body): Add defense against previous errors. * freeze.adb (Freeze_Entity): Add defense against checking null scope for generic. * restrict.adb (Tasking_Allowed): Add test for No_Run_Time mode. * sem_ch13.adb (Freeze_Entity_Checks): Add defense against previous errors. * sem_ch9.adb (Analyze_Task_Type_Declaration): Give error if in No_Run_Time mode. 2014-10-17 Robert Dewar <dewar@adacore.com> * prj-makr.adb: Minor reformatting. 2014-10-17 Robert Dewar <dewar@adacore.com> * gnatcmd.adb, make.adb, prj-part.adb, gnatlink.adb, prj-nmsc.adb, prj-conf.adb, prj-env.adb: Use Is_Directory_Separator where possible. 2014-10-17 Ed Schonberg <schonberg@adacore.com> * exp_prag.adb (Undo_Initialization): If Initialize_Scalars is enabled, code will be generated for some composite types to initialize an object after its declaration. If there is a subsequent Import pragma for the object, that code must be removed as specified byw the semantics of the pragma, and to prevent out-of-order elaboration issues in the back-end. 2014-10-17 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch4.adb (Expand_N_Op_Concat): Keep concatenation operator wrapping mechanism under debug flag -gnatd.h. * debug.adb: Claim debug switch -gnatd.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216384 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch9.adb')
-rw-r--r--gcc/ada/sem_ch9.adb15
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch9.adb b/gcc/ada/sem_ch9.adb
index 6be4f559a6c..f48c7bd960b 100644
--- a/gcc/ada/sem_ch9.adb
+++ b/gcc/ada/sem_ch9.adb
@@ -2894,7 +2894,20 @@ package body Sem_Ch9 is
T : Entity_Id;
begin
- Check_Restriction (No_Tasking, N);
+ -- Attempt to use tasking in no run time mode is not allowe. Issue hard
+ -- error message to disable expansion which leads to crashes.
+
+ if Opt.No_Run_Time_Mode then
+ Error_Msg_N ("tasking not allowed in No_Run_Time mode", N);
+
+ -- Otherwise soft check for no tasking restriction
+
+ else
+ Check_Restriction (No_Tasking, N);
+ end if;
+
+ -- Proceed ahead with analysis of task type declaration
+
Tasking_Used := True;
-- The sequential partition elaboration policy is supported only in the