From d39664b659f2442a456be865ee6adcfe1a4a5aed Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Wed, 31 May 2023 14:32:59 +0200 Subject: ada: Fix fallout of fix to handling of private views in instances Check_Actual_Type incorrectly switches the view of a private type declared in the enclosing scope of a generic unit but that has a private ancestor. gcc/ada/ * einfo.ads (Has_Private_Ancestor): Fix inaccuracy in description. * sem_ch12.adb (Check_Actual_Type): Do not switch the view of the type if it has a private ancestor. --- gcc/ada/einfo.ads | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/ada/einfo.ads') diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index a861ff7..b356b76 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -1969,7 +1969,7 @@ package Einfo is -- is defined for the type. -- Has_Private_Ancestor --- Applies to type extensions. True if some ancestor is derived from a +-- Applies to derived record types. True if an ancestor is derived from a -- private type, making some components invisible and aggregates illegal. -- This flag is set at the point of derivation. The legality of the -- aggregate must be rechecked because it also depends on the visibility -- cgit v1.1