aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/atree.h
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2018-05-22 13:23:46 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-05-22 13:23:46 +0000
commit651822aec7caa0ed1aa8cb3dfb07a380b4595b08 (patch)
treee6e5513bfff1627d63e13e3e49a4929762591082 /gcc/ada/atree.h
parent41ff70d9a5c91c3540d3fdb08ddc58d1e1d00eab (diff)
downloadgcc-651822aec7caa0ed1aa8cb3dfb07a380b4595b08.zip
gcc-651822aec7caa0ed1aa8cb3dfb07a380b4595b08.tar.gz
gcc-651822aec7caa0ed1aa8cb3dfb07a380b4595b08.tar.bz2
[Ada] Spurious visibility error in a nested instance with formal package
This patch fixes a spurious visibility error with a nested instance of a generic unit with a formal package, when the actual for it is a formal package PA of an enclosing generic, and there are subsequent uses of the formals of PA in that generic unit. 2018-05-22 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * einfo.ads, einfo.adb: New attribute Hidden_In_Formal_Instance, defined on packages that are actuals for formal packages, in order to set/reset the visibility of the formals of a formal package with given actuals, when there are subsequent uses of those formals in the enclosing generic, as required by RN 12.7 (10). * atree.ads, atree.adb: Add operations for Elist30. * atree.h: Add Elist30. * sem_ch12.adb (Analyze_Formal_Package_Instantiation): Collect formals that are not defaulted and are thus not visible within the current instance. (Check_Formal_Packages): Reset visibility of formals of a formal package that are not defaulted, on exit from current instance. gcc/testsuite/ * gnat.dg/gen_formal_pkg.adb, gnat.dg/gen_formal_pkg_a.ads, gnat.dg/gen_formal_pkg_b.ads, gnat.dg/gen_formal_pkg_w.ads: New testcase. From-SVN: r260520
Diffstat (limited to 'gcc/ada/atree.h')
-rw-r--r--gcc/ada/atree.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ada/atree.h b/gcc/ada/atree.h
index 60ec64b..338affe 100644
--- a/gcc/ada/atree.h
+++ b/gcc/ada/atree.h
@@ -530,6 +530,7 @@ extern Node_Id Current_Error_Node;
#define Elist25(N) Field25 (N)
#define Elist26(N) Field26 (N)
#define Elist29(N) Field29 (N)
+#define Elist30(N) Field30 (N)
#define Elist36(N) Field36 (N)
#define Name1(N) Field1 (N)