[Ada] Fix type mismatch in extended return statement expansion
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 21 Aug 2019 08:30:00 +0000 (08:30 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 21 Aug 2019 08:30:00 +0000 (08:30 +0000)
commitbde9a2c227e1c78215ab881de9a7eba29f45c37f
tree391fa6706b147579cd92e5a21b2127e546666177
parent92ef57728eeec64cbe2c83cee3409466e3c98448
[Ada] Fix type mismatch in extended return statement expansion

This fixes a (sub)type mismatch in the expansion of an extended return
statement generated for a built-in-place function that doesn't need a
BIP_Alloc_Form parameter but returns unconstrained.

No functional changes.

2019-08-21  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* exp_ch6.adb (Expand_N_Extended_Return_Statement): In the case
of a built-in-place function that doesn't need a BIP_Alloc_Form
parameter but returns unconstrained, build the return
consistently using the function's result subtype.  Remove bypass
added in previous change.

From-SVN: r274782
gcc/ada/ChangeLog
gcc/ada/exp_ch6.adb