trans.c (Subprogram_Body_to_gnu): For a function with copy-in/copy-out parameters...
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 5 Nov 2014 19:17:00 +0000 (19:17 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 5 Nov 2014 19:17:00 +0000 (19:17 +0000)
commit2374257aff7c2f88a7b1fa8c1466176b7d42f99c
tree136fe8c9cc145da8d36ce16196a61a8380086f0f
parent6c52b7dfc45578bd8470a3b6297ef3b04fd35926
trans.c (Subprogram_Body_to_gnu): For a function with copy-in/copy-out parameters and which returns by invisible...

* gcc-interface/trans.c (Subprogram_Body_to_gnu): For a function with
copy-in/copy-out parameters and which returns by invisible reference,
do not create the variable for the return value; instead, manually
generate the indirect copy out statements on exit.
(gnat_to_gnu) <N_Simple_Return_Statement>: Adjust accordingly and build
a simple indirect assignment for the return value.

From-SVN: r217155
gcc/ada/ChangeLog
gcc/ada/gcc-interface/trans.c
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/discr42.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/discr42_pkg.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/discr42_pkg.ads [new file with mode: 0644]