diff options
author | Hristian Kirtchev <kirtchev@adacore.com> | 2019-07-03 08:15:54 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2019-07-03 08:15:54 +0000 |
commit | abc856cf227c4a97ddb4697bb51ab0da8dba4d94 (patch) | |
tree | 6e6c2f1efc4a5602bf9a67beab58af8616112ac2 /gcc/genconstants.c | |
parent | 866000e7fb53a137db4e876dcd3f6b46195a6683 (diff) | |
download | gcc-abc856cf227c4a97ddb4697bb51ab0da8dba4d94.zip gcc-abc856cf227c4a97ddb4697bb51ab0da8dba4d94.tar.gz gcc-abc856cf227c4a97ddb4697bb51ab0da8dba4d94.tar.bz2 |
[Ada] Spurious visibility error in inlined function
This patch corrects the use of tree replication when inlining a function
that returns an unconstrained result, and its sole statement is an
extended return statement. The use of New_Copy_Tree ensires that global
references saved in a generic template are properly carried over when
the function is instantiated and inlined.
2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
gcc/ada/
* inline.adb (Build_Return_Object_Formal): New routine.
(Can_Split_Unconstrained_Function): Code clean up.
(Copy_Formals,Copy_Return_Object): New routines.
(Split_Unconstrained_Function): Code clean up and refactoring.
gcc/testsuite/
* gnat.dg/inline15.adb, gnat.dg/inline15_gen.adb,
gnat.dg/inline15_gen.ads, gnat.dg/inline15_types.ads: New
testcase.
From-SVN: r272980
Diffstat (limited to 'gcc/genconstants.c')
0 files changed, 0 insertions, 0 deletions