aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.h
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2024-09-12 16:11:47 +0200
committerMarc Poulhiès <dkm@gcc.gnu.org>2024-10-25 11:08:59 +0200
commit1c298fc41512a1062f348eb54d54d01697a66ffc (patch)
tree1e3a3d42cb98ca37c8042d5ca2f6fb968b163a2e /gcc/gcc.h
parent45ab93d9afaead934a6501f070d6ac60a6bf9dd2 (diff)
downloadgcc-1c298fc41512a1062f348eb54d54d01697a66ffc.zip
gcc-1c298fc41512a1062f348eb54d54d01697a66ffc.tar.gz
gcc-1c298fc41512a1062f348eb54d54d01697a66ffc.tar.bz2
ada: Pass parameters of full access unconstrained array types by copy in calls
When a full access array type is declared, either Volatile_Full_Access in Ada 2012 or Atomic in Ada 2022, an implicit base array type is built by the compiler with the Full_Access flag set, although full accesses cannot be generated for objects of this type because the size is not known statically. If the component type is a record with default values, an initialization procedure taking a parameter of the base array type is built. Given that full accesses cannot be generated for the parameter inside the procedure, we need to pass the actual parameter by copy to the procedure in order to implement the full access semantics. gcc/ada/ChangeLog: * exp_ch6.adb (Expand_Actuals.Is_Legal_Copy): Return True for an initialization procedure with a full access formal parameter. (Expand_Actuals.Requires_Atomic_Or_Volatile_Copy): Return True if the formal parameter is of a full access unconstrained array type.
Diffstat (limited to 'gcc/gcc.h')
0 files changed, 0 insertions, 0 deletions