[Ada] Improvements to implementation of Ada_2020 attribute Reduce
gcc/ada/
* sem_attr.adb (Min_Max): Handle the case where attribute
name (qualified by required type) appears as the reducer of a
'Reduce attribute reference.
(Resolve_Attribute) <Reduce>: Handle properly the presence of a
procedure or an attribute reference Min/Max as a reducer.
* exp_attr.adb (Expand_Attribute_Reference) <Reduce>: New
subprogram Build_Stat, to construct the combining statement
which appears in the generated loop for Reduce, and which is
either a function call when the reducer is a function or an
attribute, or a procedure call when reducer is an appropriate
procedure. BuilD_Stat is used both when the prefix of 'Reduce
is a value sequence and when it is an object