When optimizations are enabled, the runtime for delays is inlined and expanded.
If No_Tasking is set globally, for instance via a configuration file, then the
initialization of _Master, _Chain, and _Task_Name formals is skipped for task
entities. Later during expansion, these identifiers are expected but won't be
found, crashing the compiler. This patch fixes Init_Formals by removing the
check on Global_No_Tasking. If a No_Tasking restriction applies, then a
violation error will be raised when analyzing the task type.
gcc/ada/ChangeLog:
* exp_ch3.adb (Init_Formals): Remove the check on Global_No_Tasking.
* sem.adb: Fix typo.
or else (Is_Record_Type (Typ)
and then Is_Protected_Record_Type (Typ));
With_Task : constant Boolean :=
- not Global_No_Tasking
- and then
- (Has_Task (Typ)
- or else (Is_Record_Type (Typ)
- and then Is_Task_Record_Type (Typ)));
+ Has_Task (Typ)
+ or else (Is_Record_Type (Typ)
+ and then Is_Task_Record_Type (Typ));
Formals : List_Id;
begin
-- Compile predefined units with GNAT_Mode set to True, to properly
-- process the categorization stuff. However, do not set GNAT_Mode
- -- to True for the renamings units (Text_IO, IO_Exceptions, Direct_IO,
+ -- to True for the renaming units (Text_IO, IO_Exceptions, Direct_IO,
-- Sequential_IO) as this would prevent pragma Extend_System from being
-- taken into account, for example when Text_IO is renaming DEC.Text_IO.