]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Fix type mismatch in extended return statement expansion
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 21 Aug 2019 08:30:00 +0000 (08:30 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 21 Aug 2019 08:30:00 +0000 (08:30 +0000)
commitc315a4384c497648aa618a517a059198feef0988
tree391fa6706b147579cd92e5a21b2127e546666177
parentab57dde09df4cff22bc6084452ccae2bbaecebfa
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@274782 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/exp_ch6.adb