ada: Improve efficiency of slice-of-component assignment
This patch improves the efficiency of slice assignment when the left- or
right-hand side is a slice of a component or a slice of a slice.
Previously, the optimization was disabled in these cases, just in
case there might be a volatile or independent component lurking.
Now we explicitly check all the relevant subcomponents of
the prefix.
The previous version said (in exp_ch5.adb):
-- ...We could
-- complicate this code by actually looking for such volatile and
-- independent components.
and that's exactly what we are doing here.
gcc/ada/
* exp_ch5.adb
(Expand_Assign_Array_Loop_Or_Bitfield): Make the checks for
volatile and independent objects more precise.