Hi, this is the updated version of the patch initially posted at: https://gcc.gnu.org/ml/gcc-patches/2016-06/msg02016.html It takes into account Jeff's remarks, both on the code and the documentation.
As discussed, I'm going to split it into 4 parts: common infrastructure, Ada front-end bits, individual back-end changes, testsuite. It was bootstrapped and regtested on x86_64-suse-linux but AdaCore has been using it on native platforms (Linux, Windows, Solaris, etc) and various architectures (x86, PowerPC, SPARC, ARM, etc) for years. ada/gcc-interface/misc.c | 2 ada/gcc-interface/trans.c | 40 +++++++- builtins.c | 62 +++++++++++++ builtins.def | 2 calls.c | 101 +++++++++++++++++++--- cfgexpand.c | 1 common.opt | 5 + config/aarch64/aarch64.h | 4 config/alpha/alpha.h | 3 config/arm/arm.c | 27 +++++- config/arm/arm.h | 4 config/i386/i386.h | 3 config/ia64/ia64.h | 3 config/mips/mips.h | 4 config/pa/pa.h | 3 config/rs6000/rs6000.h | 3 config/sparc/sparc.h | 3 defaults.h | 11 ++ doc/invoke.texi | 24 +++++ doc/tm.texi | 18 ++++ doc/tm.texi.in | 2 gimple.c | 4 gimple.h | 21 ++++ langhooks-def.h | 2 langhooks.h | 4 rtl.h | 5 + rtlanal.c | 3 target.def | 19 ++++ testsuite/gnat.dg/trampoline3.adb | 22 ++++ testsuite/gnat.dg/trampoline4.adb | 23 +++++ tree-core.h | 9 ++ tree-nested.c | 169 ++++++++++++++++++++++++++++++------ tree.c | 9 +- tree.h | 10 ++ 34 files changed, 574 insertions(+), 51 deletions(-) -- Eric Botcazou