aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/misc.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-09-19 08:14:23 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-09-19 08:14:23 +0000
commit9e0746fcd5bb14d164d3686b0940ae7129d05231 (patch)
treea0925593d1b606a60ed49952f71ea5226bb4163f /gcc/ada/gcc-interface/misc.c
parentfd0d7b4e3be10508119636f06807f23d5691088b (diff)
downloadgcc-9e0746fcd5bb14d164d3686b0940ae7129d05231.zip
gcc-9e0746fcd5bb14d164d3686b0940ae7129d05231.tar.gz
gcc-9e0746fcd5bb14d164d3686b0940ae7129d05231.tar.bz2
[Ada] Fix bogus visibility error with nested generics and inlining
This prevents the compiler from issuing a bogus error about the visibility of an operator in an instantiation of a nested generic package which is itself used as an actual of an instantiation of another generic package, when the instantiations are done in a unit withed from the main unit and containing an inlined subprogram, and cross-unit inlining is enabled. In most cases, the compiler does not check the visibility of operators in an instantiation context because this has already been done when the generic package has been analyzed. However, there are exceptions like the actuals of an instantiation of a generic child unit which is done as a compilation unit and the In_Instance predicate has a special check for these cases. This check would incorrectly trigger here and needs to be tightened. 2019-09-19 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_util.adb (In_Instance): Test whether the current unit has been analyzed instead of being on the scope stack to detect the case of actuals of an instantiation of a generic child unit done as a compilation unit. gcc/testsuite/ * gnat.dg/inline20.adb, gnat.dg/inline20_g.adb, gnat.dg/inline20_g.ads, gnat.dg/inline20_h.ads, gnat.dg/inline20_i.ads, gnat.dg/inline20_q-io.ads, gnat.dg/inline20_q.ads, gnat.dg/inline20_r.ads: New testcase. From-SVN: r275952
Diffstat (limited to 'gcc/ada/gcc-interface/misc.c')
0 files changed, 0 insertions, 0 deletions