2016-04-21 Javier Miranda <miranda@adacore.com>
commitb63b3ba91b07d45e4f78cfed264c6845efe1af01
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Apr 2016 08:20:59 +0000 (21 08:20 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Apr 2016 08:20:59 +0000 (21 08:20 +0000)
treec70e2a312fdf1955c988288302805654920c645e
parent02e5d0d095259d255a5c67490b517dde070dcfca
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235305 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/exp_ch6.adb
gcc/ada/exp_util.adb
gcc/ada/sem_ch6.adb