[Ada] Spurious error on inst. of partially defaulted formal package
authorEd Schonberg <schonberg@adacore.com>
Mon, 1 Jul 2019 13:37:47 +0000 (13:37 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 1 Jul 2019 13:37:47 +0000 (13:37 +0000)
commitd21c7dd6a2cf854da4776082cc6903acbdf8391f
treebad13ae0930e056837e7a5850e4f592197534b5a
parent6578a6bfec1ae4a6a077055ebf0024e0079b80f7
[Ada] Spurious error on inst. of partially defaulted formal package

This patch removes a spurious error on an instantiation whose generic
unit has a formal package where some formal parameters are
box-initialiaed.  Previously the code assumed that box-initialization
for a formal package applied to all its formal parameters.

2019-07-01  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* sem_ch12.adb (Is_Defaulted): New predicate in
Check_Formal_Package_Intance, to skip the conformance of checks
on parameters of a formal package that are defaulted,

gcc/testsuite/

* gnat.dg/generic_inst3.adb,
gnat.dg/generic_inst3_kafka_lib-topic.ads,
gnat.dg/generic_inst3_kafka_lib.ads,
gnat.dg/generic_inst3_markets.ads,
gnat.dg/generic_inst3_traits-encodables.ads,
gnat.dg/generic_inst3_traits.ads: New testcase.

From-SVN: r272883
gcc/ada/ChangeLog
gcc/ada/sem_ch12.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/generic_inst3.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/generic_inst3_kafka_lib-topic.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/generic_inst3_kafka_lib.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/generic_inst3_markets.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/generic_inst3_traits-encodables.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/generic_inst3_traits.ads [new file with mode: 0644]