This fixes an issue introduced in Ada 2012 for calls to functions taking an In/Out parameter and for which the actual is the component of a packed array. In this case, the front-end needs to create a temporary for the actual, initialize it before the call and assign it back after it, because operations on bit-packed arrays are converted into mask-and-shift sequences. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-07-05 Eric Botcazou gcc/ada/ * exp_ch4.adb (Expand_N_Indexed_Component): Do not expand actual parameters of function calls here either. gcc/testsuite/ * gnat.dg/pack23.adb, gnat.dg/pack23_pkg.ads: New testcase.