This patch fixes an issue in the compiler whereby declarations of derived types
whose parent is a mutably tagged type cause early freezing of the parent type -
leading to spurious compile-time errors.
gcc/ada/ChangeLog:
* sem_ch3.adb (Derived_Type_Declaration): Modify generation of
compile time check.
-- to the backend since we don't know the true size of
-- anything at this point.
- Insert_After_And_Analyze (N,
- Make_CW_Size_Compile_Check (T, Root_Class_Typ));
+ Append_Freeze_Actions (T,
+ New_List (Make_CW_Size_Compile_Check (T, Root_Class_Typ)));
end if;
end if;
end;