[Ada] Aspect CPU may depend on a discriminant of a task type
2019-07-23 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations, Freeze_Entity_Checks): Include Aspect_CPU with other aspects whose expresssion may depend on a discriminant, and thus require that components of the type be made visible. gcc/testsuite/ * gnat.dg/task4.adb: New testcase. From-SVN: r273726
This commit is contained in:
parent
67460d4575
commit
4e2a165210
@ -1,3 +1,10 @@
|
||||
2019-07-23 Ed Schonberg <schonberg@adacore.com>
|
||||
|
||||
* sem_ch13.adb (Check_Aspect_At_End_Of_Declarations,
|
||||
Freeze_Entity_Checks): Include Aspect_CPU with other aspects
|
||||
whose expresssion may depend on a discriminant, and thus require
|
||||
that components of the type be made visible.
|
||||
|
||||
2019-07-23 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* checks.adb (Convert_And_Check_Range): Add Suppress parameter
|
||||
|
@ -9388,6 +9388,7 @@ package body Sem_Ch13 is
|
||||
elsif A_Id = Aspect_Dynamic_Predicate
|
||||
or else A_Id = Aspect_Predicate
|
||||
or else A_Id = Aspect_Priority
|
||||
or else A_Id = Aspect_CPU
|
||||
then
|
||||
Push_Type (Ent);
|
||||
Preanalyze_Spec_Expression (End_Decl_Expr, T);
|
||||
@ -11279,6 +11280,7 @@ package body Sem_Ch13 is
|
||||
if A_Id = Aspect_Dynamic_Predicate
|
||||
or else A_Id = Aspect_Predicate
|
||||
or else A_Id = Aspect_Priority
|
||||
or else A_Id = Aspect_CPU
|
||||
then
|
||||
-- Retrieve the visibility to components and discriminants
|
||||
-- in order to properly analyze the aspects.
|
||||
|
@ -1,3 +1,7 @@
|
||||
2019-07-23 Ed Schonberg <schonberg@adacore.com>
|
||||
|
||||
* gnat.dg/task4.adb: New testcase.
|
||||
|
||||
2019-07-23 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gnat.dg/range_check5.adb: New testcase.
|
||||
|
19
gcc/testsuite/gnat.dg/task4.adb
Normal file
19
gcc/testsuite/gnat.dg/task4.adb
Normal file
@ -0,0 +1,19 @@
|
||||
-- { dg-do compile }
|
||||
|
||||
with System.Multiprocessors;
|
||||
|
||||
procedure Task4 is
|
||||
|
||||
task type Infinite_Loop (C : System.Multiprocessors.CPU_Range)
|
||||
with CPU => C;
|
||||
|
||||
task body Infinite_Loop is
|
||||
begin
|
||||
loop
|
||||
null;
|
||||
end loop;
|
||||
end Infinite_Loop;
|
||||
|
||||
begin
|
||||
null;
|
||||
end Task4;
|
Loading…
Reference in New Issue
Block a user