aboutsummaryrefslogtreecommitdiff
path: root/gcc/read-rtl-function.c
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2019-07-09 07:54:05 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-07-09 07:54:05 +0000
commita74d1bf6af0aaeb693cdbddf924c9af53f92b549 (patch)
tree9ab3bec342e407244ab1494d783dc5695742b9bb /gcc/read-rtl-function.c
parent554a9844f74932d2c6e9a690d04bfd96b361055b (diff)
downloadgcc-a74d1bf6af0aaeb693cdbddf924c9af53f92b549.zip
gcc-a74d1bf6af0aaeb693cdbddf924c9af53f92b549.tar.gz
gcc-a74d1bf6af0aaeb693cdbddf924c9af53f92b549.tar.bz2
[Ada] Spurious error when instance of generic is used as formal package
This patch removes a spurious bug on the use of the current instance of a generic package G as the actual in a nested instantiation of a generic unit GU that has a formal package whose generic_package name is G. This is only legal if G has no generic formal part, and the formal package declaration is declared with a box or without a formal_paxkage_actual part. 2019-07-09 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_ch12.adb (Instantiate_Formal_Package): Handle properly the case where the actual for a formal package in an instance is the current instance of an enclosing generic package. (Check_Formal_Packages): If the formal package declaration is box-initialized or lacks associations altogether, no internal instance was created to verify conformance, and there is no validating package to remove from tree. gcc/testsuite/ * gnat.dg/generic_inst5.adb, gnat.dg/generic_inst6.adb, gnat.dg/generic_inst6_g1-c.adb, gnat.dg/generic_inst6_g1-c.ads, gnat.dg/generic_inst6_g1.ads, gnat.dg/generic_inst6_i1.ads, gnat.dg/generic_inst6_i2.ads, gnat.dg/generic_inst6_x.ads: New testcases. From-SVN: r273275
Diffstat (limited to 'gcc/read-rtl-function.c')
0 files changed, 0 insertions, 0 deletions