aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/debug.adb
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-03-05 18:30:34 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-05-26 09:29:17 +0200
commit593e08bd1ed37b588332fc6953dd94c1dbf5db51 (patch)
tree3dc1f7a016bbcf8ea24906da5b7f2064ea7d8da9 /gcc/ada/debug.adb
parentc7a07d7e6a09c43682576f625fc232a0ba3ee3ba (diff)
downloadgcc-593e08bd1ed37b588332fc6953dd94c1dbf5db51.zip
gcc-593e08bd1ed37b588332fc6953dd94c1dbf5db51.tar.gz
gcc-593e08bd1ed37b588332fc6953dd94c1dbf5db51.tar.bz2
ada: Reject thin 'Unrestricted_Access value to aliased constrained array
This rejects the Unrestricted_Access attribute applied to an aliased array with a constrained nominal subtype when its type is resolved to be a thin pointer. The reason is that supporting this case would require the aliased array to contain its bounds, and this is the case only for aliased arrays whose nominal subtype is unconstrained. gcc/ada/ * sem_attr.adb (Is_Thin_Pointer_To_Unc_Array): New predicate. (Resolve_Attribute): Apply the static matching legality rule to an Unrestricted_Access attribute applied to an aliased prefix if the type is a thin pointer. Call Is_Thin_Pointer_To_Unc_Array for the aliasing legality rule as well.
Diffstat (limited to 'gcc/ada/debug.adb')
0 files changed, 0 insertions, 0 deletions