diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2024-11-27 13:03:08 +0100 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2024-12-13 09:36:00 +0100 |
commit | 82c1b037959d06a76309e4d371aba020b010d9fa (patch) | |
tree | b3b627bf32dcc5ff90ac6f01b5034ca217f66e07 /gcc/ggc-tests.cc | |
parent | 240b09db7e1eaa0c1cc411edb9ba67a3553e7a8b (diff) | |
download | gcc-82c1b037959d06a76309e4d371aba020b010d9fa.zip gcc-82c1b037959d06a76309e4d371aba020b010d9fa.tar.gz gcc-82c1b037959d06a76309e4d371aba020b010d9fa.tar.bz2 |
ada: Fix dangling reference with user-defined indexing of function call
This happens with a noncontrolled type because the user-defined indexing is
expanded into a function call that binds the lifetime of the original call
to its return value. The temporary must be created explicitly in this case,
so that the front-end can control its lifetime.
gcc/ada/ChangeLog:
* exp_ch6.adb (Expand_Call_Helper): Also create a temporary in the
case of a noncontrolled user-defined indexing.
Diffstat (limited to 'gcc/ggc-tests.cc')
0 files changed, 0 insertions, 0 deletions