[Ada] Fix fallout of previous change for bit-packed arrays
This fixes a regression introduced by the previous change that improved
the handling of explicit by-reference mechanism. For the very specific
case of a component of a bit-packed array, the front-end still needs to
insert a copy around the call because this is where the rewriting into
the sequence of mask-and-shifts is done for the code generator.
2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
gcc/ada/
* exp_ch6.adb (Add_Simple_Call_By_Copy_Code): Add
Bit_Packed_Array parameter and documet it. Always insert a copy
if it is set True.
(Expand_Actuals): Adjust the calls to
Add_Simple_Call_By_Copy_Code.
gcc/testsuite/
* gnat.dg/pack26.adb: New testcase.
From-SVN: r275933