aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/Make-lang.in
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-09-19 08:12:39 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-09-19 08:12:39 +0000
commit5d66b937e3d1bbdbaace1da7bc5fac8a94793108 (patch)
tree4f2ebfa5a4a67a2c20f5e99859462cfa214adb31 /gcc/ada/gcc-interface/Make-lang.in
parentf4437882fe972b14eb5f4163de34fa9c909b5fb6 (diff)
downloadgcc-5d66b937e3d1bbdbaace1da7bc5fac8a94793108.zip
gcc-5d66b937e3d1bbdbaace1da7bc5fac8a94793108.tar.gz
gcc-5d66b937e3d1bbdbaace1da7bc5fac8a94793108.tar.bz2
[Ada] Improve handling of explicit by-reference mechanism
This improves the handling of an explicit by-reference passing mechanism specified by means of the GNAT pragma Export_Function. This device sort of circumvents the rules of the language for the by-reference passing mechanism and it's then up to the programmer to ensure that the actual parameter is addressable; if it is not, the compiler will generate a temporary around the call, thus effectively passing the actual by copy. It turns out that the compiler was too conservative when determining whether the actual parameter is addressable, in particular if it's a component of a record type subject to a representation clause. The change effectively moves this computation from the front-end to the back-end, which has much more information on the layout and alignment of types and thus can be less conservative. 2019-09-19 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * exp_ch6.adb (Is_Legal_Copy): Also return false for an aliased formal and a formal passed by reference in convention Ada. Add missing guard to the existing test on Is_Valued_Procedure. From-SVN: r275931
Diffstat (limited to 'gcc/ada/gcc-interface/Make-lang.in')
0 files changed, 0 insertions, 0 deletions