summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_aggr.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_aggr.adb')
-rw-r--r--gcc/ada/sem_aggr.adb8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb
index 53b340dae69..1e28ab0cd42 100644
--- a/gcc/ada/sem_aggr.adb
+++ b/gcc/ada/sem_aggr.adb
@@ -3706,10 +3706,14 @@ package body Sem_Aggr is
end if;
end Process_Component;
+ -- Start of processing for Propagate_Discriminants
+
begin
-- The component type may be a variant type, so
-- collect the components that are ruled by the
- -- known values of the discriminants.
+ -- known values of the discriminants. Their values
+ -- have already been inserted into the component
+ -- list of the current aggregate.
if Nkind (Def_Node) = N_Record_Definition
and then
@@ -3720,7 +3724,7 @@ package body Sem_Aggr is
then
Gather_Components (Aggr_Type,
Component_List (Def_Node),
- Governed_By => Assoc_List,
+ Governed_By => Component_Associations (Aggr),
Into => Components,
Report_Errors => Errors);