aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/doc/gnat_rm/gnat_language_extensions.rst
diff options
context:
space:
mode:
authorGary Dismukes <dismukes@adacore.com>2024-05-23 22:06:21 +0000
committerMarc Poulhiès <poulhies@adacore.com>2024-06-20 10:50:57 +0200
commitecb84b0aa4eac2050eedd7f9a66dd7393d5d31c2 (patch)
tree4556981a4b445c594f2f59fa16e71a84d8161fe7 /gcc/ada/doc/gnat_rm/gnat_language_extensions.rst
parent3c6dcd1d018da645316e3969748d70a1efd66dd2 (diff)
downloadgcc-ecb84b0aa4eac2050eedd7f9a66dd7393d5d31c2.zip
gcc-ecb84b0aa4eac2050eedd7f9a66dd7393d5d31c2.tar.gz
gcc-ecb84b0aa4eac2050eedd7f9a66dd7393d5d31c2.tar.bz2
ada: Crash on selected component of formal derived type in generic instance
The compiler crashes on an instantiation of a generic child unit G1.GC that has a formal private extension P_Ext of a private type P declared in the parent G1 whose full type has a component C, when analyzing a selected component ACC.C whose prefix is of an access type coming from an instantiation of another generic G2 where the designated type is the formal type P_Ext (coming in from a formal type of G2). gcc/ada/ * sem_ch4.adb (Try_Selected_Component_In_Instance): Reverse if_statement clauses so that the testing for the special case of extensions of private types in instance bodies is done first, followed by the testing for the case of a parent type that's a generic actual type. In the extension case, apply Base_Type to the type actual in the test of Used_As_Generic_Actual, and add a test of Present (Parent_Subtype (Typ)).
Diffstat (limited to 'gcc/ada/doc/gnat_rm/gnat_language_extensions.rst')
0 files changed, 0 insertions, 0 deletions