aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/accessibility.adb
diff options
context:
space:
mode:
authorDaniel King <dmking@adacore.com>2023-08-01 14:39:39 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-09-05 13:05:12 +0200
commitc416d2f768b73daa28d2fcd0c80656956ae9242c (patch)
treeefcdee05d34e631f9f9a7342c3f6753a37c5511e /gcc/ada/accessibility.adb
parent518f93c17983623107ff2091728c93b02fc0eeb2 (diff)
downloadgcc-c416d2f768b73daa28d2fcd0c80656956ae9242c.zip
gcc-c416d2f768b73daa28d2fcd0c80656956ae9242c.tar.gz
gcc-c416d2f768b73daa28d2fcd0c80656956ae9242c.tar.bz2
ada: Preserve capability validity in address arithmetic
On CHERI targets where System.Address is a capability, arithmetic on addresses should avoid converting to integers and instead use the operations defined in System.Storage_Elements to perform the arithmetic directly on the System.Address object. This preserves the capability's validity throughout the calculation, ensuring that the resulting capability can be dereferenced. gcc/ada/ * libgnat/s-carsi8.adb: Use operations from System.Storage_Elements for address arithmetic. * libgnat/s-carun8.adb: Likewise * libgnat/s-casi128.adb: Likewise * libgnat/s-casi16.adb: Likewise * libgnat/s-casi32.adb: Likewise * libgnat/s-casi64.adb: Likewise * libgnat/s-caun128.adb: Likewise * libgnat/s-caun16.adb: Likewise * libgnat/s-caun32.adb: Likewise * libgnat/s-caun64.adb: Likewise * libgnat/s-geveop.adb: Likewise
Diffstat (limited to 'gcc/ada/accessibility.adb')
0 files changed, 0 insertions, 0 deletions