sem_ch6.adb (Build_Subprogram_Declaration): Propagate the attribute Rewritten_For_C...
authorJavier Miranda <miranda@adacore.com>
Thu, 21 Apr 2016 08:20:59 +0000 (08:20 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Thu, 21 Apr 2016 08:20:59 +0000 (10:20 +0200)
commitaeb98f1dcd25905b55c0b30c3189e9ddae55b7d2
treec70e2a312fdf1955c988288302805654920c645e
parent2cc7967fbeef31d46df49a9aaa92af1cddb9fca6
sem_ch6.adb (Build_Subprogram_Declaration): Propagate the attribute Rewritten_For_C to the body since since the expander...

2016-04-21  Javier Miranda  <miranda@adacore.com>

* sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
attribute Rewritten_For_C to the body since since the expander
may generate calls using that entity.
* exp_ch6.adb (Expand_Call): For internally generated
calls ensure that they reference the entity of the spec
of the called function.
(Rewritten_For_C_Func_Id): New subprogram.
(Rewritten_For_C_Proc_Id): New subprogram.
(Rewrite_Function_Call_For_C): Invoke the new subprogram to
ensure that we skip freezing entities.
* exp_util.adb (Build_Procedure_Form): No action needed if the
procedure was already built.

From-SVN: r235305
gcc/ada/ChangeLog
gcc/ada/exp_ch6.adb
gcc/ada/exp_util.adb
gcc/ada/sem_ch6.adb