[Ada] Fix incorrect call to inherited function with limited return type
authorEric Botcazou <ebotcazou@adacore.com>
Sat, 5 Mar 2022 18:18:18 +0000 (19:18 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 13 May 2022 08:04:47 +0000 (08:04 +0000)
commitc77e4873b14bd84fc6715db8980ce14886b28906
tree65fdb5f5c750c0b5e539b80f871fe2c89d22b8cb
parentba75fee24d91eb241b5784a8a55175c294b040ab
[Ada] Fix incorrect call to inherited function with limited return type

This is a return convention mismatch coming from a discrepancy of the
Returns_By_Ref flag for the inherited function.

gcc/ada/

* sem_ch3.adb (Derive_Subprogram): For a function, also copy the
Returns_By_Ref flag from the parent.
gcc/ada/sem_ch3.adb