[Ada] Disable wrong computation of offsets within multidimensional arrays
Pierre-Marie de Rodat
derodat@adacore.com
Mon Jun 21 11:05:33 GMT 2021
Routine Indexed_Component_Bit_Offset is meant to return the first bit
position of an array component, but it only examined the first index
expression and necessarily produced wrong results for multidimensional
arrays.
Since this routine is only used for warnings, it is safe to simply
disable this wrong code and behave just like if the offsets within
a multidimensional array would not be known at compile time.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Indexed_Component_Bit_Offset): Return an unknown
offset for components within multidimensional arrays; remove
redundant parens.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 764 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210621/1a6e2ae0/attachment-0001.bin>
More information about the Gcc-patches
mailing list