ada: Fix calling convention of foreign functions returning limited type
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 8 Dec 2022 09:51:29 +0000 (10:51 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 3 Jan 2023 09:29:53 +0000 (10:29 +0100)
commitbfe1ab222a8095b31c29d8f3530268f048fea00f
tree0c9b2fb1534a52fb29ce8a0e67646f4e916d7788
parent742084ada1e0974f5c7491fda65702e45bd07848
ada: Fix calling convention of foreign functions returning limited type

Such functions use neither Ada 2005's build-in-place mechanism nor Ada 95's
return-by-reference mechanism, but instead the common calling convention of
functions returning a nonlimited by-reference type.

gcc/ada/

* exp_ch6.adb (Is_Build_In_Place_Function): Adjust comment.
* sem_util.adb (Compute_Returns_By_Ref): Do not set Returns_By_Ref
on functions with foreign convention.
gcc/ada/exp_ch6.adb
gcc/ada/sem_util.adb