sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is created for SPARK_To_C...
authorEd Schonberg <schonberg@adacore.com>
Thu, 21 Apr 2016 08:21:47 +0000 (08:21 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Thu, 21 Apr 2016 08:21:47 +0000 (10:21 +0200)
commit17fd72cef4060b14c2cf363726261f820fdcab10
tree6d78cfbf4eddbde7ffc65d7c92d2e4e1c9f74bc3
parentaeb98f1dcd25905b55c0b30c3189e9ddae55b7d2
sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is created for SPARK_To_C...

2016-04-21  Ed Schonberg  <schonberg@adacore.com>

* sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
created for SPARK_To_C, the entity must remain invisible so it
does not overload subsequent references to the original function.
* exp_ch6.adb (Build_Procedure_Body_Form, Replace_Returns):
Handle Extended_Return_Statements by replacing it with a block
with assignments and a simple return statement.
* exp_util.adb (Build_Procedure_Form): Make procedure entity
invisible after analyzing declaration, to prevent improper
overloading.

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