[Ada] Use static discriminant value for discriminated task record
authorEd Schonberg <schonberg@adacore.com>
Wed, 18 Sep 2019 08:33:32 +0000 (08:33 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 18 Sep 2019 08:33:32 +0000 (08:33 +0000)
commit0cff31f0f67a88fd1bf76bab430eaa0adac94ffa
tree849b0df78fdbcbaac14da6e1c1a9bc1c6b4a4f3d
parentb8411279b0674cd76850b0fa8266e8db21724e0e
[Ada] Use static discriminant value for discriminated task record

This patch allows the construction of a static subtype for the generated
constrained Secondary_Stack component of a task for which a stack size
is specified, when compiling for a restricted run-time that forbids
dynamic allocation. Needed for LLVM.

2019-09-18  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* sem_ch3.adb (Constrain_Component_Type): For a discriminated
type, handle the case of a constraint given by a conversion of a
discriminant of the enclosing type. Necessary when compiling a
discriminated task for a restricted run-time, when the generated
Secondary_Stack component may be set by means of an aspect on
the task type.

From-SVN: r275863
gcc/ada/ChangeLog
gcc/ada/sem_ch3.adb