]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Fix bad interaction between inlining and thunk generation
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 20 Jun 2023 22:50:40 +0000 (00:50 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 27 Jun 2023 12:05:52 +0000 (14:05 +0200)
commit2ed0e911e40e1182d58d19e79cfed72c04d2fd66
tree0a552ffb8b9ec5f98f41355b979d124ad97fce94
parent388f22b92fe2218427e1b5ab5d29f51d037f2969
ada: Fix bad interaction between inlining and thunk generation

This may cause the type of the RESULT_DECL of a function which returns by
invisible reference to be turned into a reference type twice.

gcc/ada/

* gcc-interface/trans.cc (Subprogram_Body_to_gnu): Add guard to the
code turning the type of the RESULT_DECL into a reference type.
(maybe_make_gnu_thunk): Use a more precise guard in the same case.
gcc/ada/gcc-interface/trans.cc