diff options
author | squirek <squirek@adacore.com> | 2024-08-13 11:42:41 +0000 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2024-10-08 10:37:13 +0200 |
commit | 0171938cfc357ed43c2b95ddee504f614cac7982 (patch) | |
tree | 994e2fedb6648b7dbe641ffbf32616d357aa4550 /gcc | |
parent | d9b76deb580eb4fc5046d6c0263f420acaa444c9 (diff) | |
download | gcc-0171938cfc357ed43c2b95ddee504f614cac7982.zip gcc-0171938cfc357ed43c2b95ddee504f614cac7982.tar.gz gcc-0171938cfc357ed43c2b95ddee504f614cac7982.tar.bz2 |
ada: Early freezeing of types with 'Size'Class
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_ch3.adb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index e2050e4..2a48882 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -17956,8 +17956,8 @@ package body Sem_Ch3 is -- 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; |