diff options
author | Steve Baird <baird@adacore.com> | 2023-06-08 15:08:11 -0700 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-08-01 10:06:45 +0200 |
commit | 77604913b73e35b1b7f38725c526ac558ff165be (patch) | |
tree | 148f7e3b8efb5265fbb59a9d0e1736758801c611 /gcc | |
parent | 04c297101019316eb8c3191ffb2ff0bf34f4d869 (diff) | |
download | gcc-77604913b73e35b1b7f38725c526ac558ff165be.zip gcc-77604913b73e35b1b7f38725c526ac558ff165be.tar.gz gcc-77604913b73e35b1b7f38725c526ac558ff165be.tar.bz2 |
ada: Bugbox compiling Constrained_Protected_Object'Image
In some cases, a bugbox is generated when compiling an example
that references X'Image, where X is a constrained object of a
discriminated protected type.
gcc/ada/
* sem_ch3.adb (Constrain_Corresponding_Record): When copying
information from the unconstrained record type to a newly
constructed constrained record subtype, the
Direct_Primitive_Operations attribute must be copied.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_ch3.adb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index ed337f5..042ace0 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -14325,6 +14325,8 @@ package body Sem_Ch3 is Set_Is_Constrained (T_Sub, True); Set_First_Entity (T_Sub, First_Entity (Corr_Rec)); Set_Last_Entity (T_Sub, Last_Entity (Corr_Rec)); + Set_Direct_Primitive_Operations + (T_Sub, Direct_Primitive_Operations (Corr_Rec)); if Has_Discriminants (Prot_Subt) then -- False only if errors. Set_Discriminant_Constraint |