[Ada] Crash on exported build-in-place function
This patch fixes a bug where if a function is build-in-place, and is
exported, and contains an extended_return_statement whose object is
initialized with another build-in-place function call, then the compiler
will crash.
2019-07-05 Bob Duff <duff@adacore.com>
gcc/ada/
* exp_ch6.adb (Is_Build_In_Place_Function): Narrow the check for
Has_Foreign_Convention to the imported case only. If a
build-in-place function is exported, and called from Ada code,
build-in-place protocols should be used.
gcc/testsuite/
* gnat.dg/bip_export.adb, gnat.dg/bip_export.ads: New testcase.
From-SVN: r273113