[Ada] Assertion failure on Default_Initial_Condition
authorHristian Kirtchev <kirtchev@adacore.com>
Thu, 4 Jul 2019 08:06:19 +0000 (08:06 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 4 Jul 2019 08:06:19 +0000 (08:06 +0000)
commitdd4d8a71980487ddb4ac6c1ad0a1b8fb6c143592
treec93ad7b864d97bb11f4e6f99ccf4e04e99766f1e
parent7cbdab5aa839ffd54dccbde6430905bb9c596201
[Ada] Assertion failure on Default_Initial_Condition

This patch prevents the association of a Default_Initial_Condition with
an incomplete type whose full view is the private type or private
extension subject to the aspect/pragma.

2019-07-04  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

* sem_util.adb (Propagate_DIC_Attributes): Do not propagate the
Default_Initial_Condition attributes to an incomplete type.

gcc/testsuite/

* gnat.dg/default_initial_condition.adb,
gnat.dg/default_initial_condition_pack.adb,
gnat.dg/default_initial_condition_pack.ads: New testcase.

From-SVN: r273059
gcc/ada/ChangeLog
gcc/ada/sem_util.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/default_initial_condition.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/default_initial_condition_pack.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/default_initial_condition_pack.ads [new file with mode: 0644]