diff options
Diffstat (limited to 'gcc/ada/exp_cg.adb')
-rw-r--r-- | gcc/ada/exp_cg.adb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/exp_cg.adb b/gcc/ada/exp_cg.adb index 376f9cadf60..425ae540526 100644 --- a/gcc/ada/exp_cg.adb +++ b/gcc/ada/exp_cg.adb @@ -129,6 +129,14 @@ package body Exp_CG is Write_Call_Info (N); else pragma Assert (Nkind (N) = N_Defining_Identifier); + + -- The type may be a private untagged type whose completion is + -- tagged, in which case we must use the full tagged view. + + if not Is_Tagged_Type (N) and then Is_Private_Type (N) then + N := Full_View (N); + end if; + pragma Assert (Is_Tagged_Type (N)); Write_Type_Info (N); |