aboutsummaryrefslogtreecommitdiff
path: root/gcc/btfout.cc
diff options
context:
space:
mode:
authorSteve Baird <baird@adacore.com>2023-06-08 14:44:52 -0700
committerMarc Poulhiès <poulhies@adacore.com>2023-12-19 15:27:47 +0100
commit27fd2dc518b696d260336a60fbb0c8baa1ef80a6 (patch)
treea8077121e05a503dc5ad1a620e7a74ecd13da6fd /gcc/btfout.cc
parent54d049b2815a03d1f58dee4df1c4cc0b0faddcc1 (diff)
downloadgcc-27fd2dc518b696d260336a60fbb0c8baa1ef80a6.zip
gcc-27fd2dc518b696d260336a60fbb0c8baa1ef80a6.tar.gz
gcc-27fd2dc518b696d260336a60fbb0c8baa1ef80a6.tar.bz2
ada: Illegal instance of Generic_1.Generic_2 incorrectly accepted
If G1 is a generic package and G1.G2 is a child unit (also a generic package) then it would be illegal if some third generic unit (declared outside of G1) takes a formal instance of G1.G2, as in "with package I2 is new G1.G2;". This construct was incorrectly accepted in some cases. gcc/ada/ * sem_ch12.adb (Check_Generic_Child_Unit): Introduce a new nested function Adjusted_Inst_Par_Ekind to cope with cases where either a- the visibility of a compiler-generated renaming is incorrect; or b- we are inside of a generic parent unit G1 that has a child unit G1.G2, so instantiation of G1.G2 is permitted.
Diffstat (limited to 'gcc/btfout.cc')
0 files changed, 0 insertions, 0 deletions