[Ada] Fix wrong value of 'Size for slices of bit-packed arrays (2)

2019-12-12 Thread Pierre-Marie de Rodat
This completes the previous fix, which is not sufficient when the Size attribute is applied to a formal object of mode In Out and the generic is instantiated on a slice of a bit-packed array whose size is not a multiple of the storage unit. The hurdle here is that introducing a temporary may chang

[Ada] Fix wrong value of 'Size for slices of bit-packed arrays

2019-09-17 Thread Pierre-Marie de Rodat
This fixes a long-standing issue in the compiler which would return a wrong value for the Size attribute applied to slices of bit-packed arrays whose size is not a multiple of the storage unit. The problem is that the computation was done in the code generator after the bit-packed array had been i