ada: Further tweak new expansion of contracts
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 26 Sep 2022 20:50:28 +0000 (22:50 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 29 Sep 2022 09:08:47 +0000 (11:08 +0200)
commit0f8a934b44ef0d64b5c96c673d14da78867a2738
treed4a8b01d962b742679a4c616870c59b413a75b20
parent9ebc54a8c472e19d81e23ee4094f619e0437e673
ada: Further tweak new expansion of contracts

The original extended return statement is mandatory for functions whose
result type is limited in Ada 2005 and later.

gcc/ada/

* contracts.adb (Build_Subprogram_Contract_Wrapper): Put back the
extended return statement if the result type is built-in-place.
* sem_attr.adb (Analyze_Attribute_Old_Result): Also expect an
extended return statement.
gcc/ada/contracts.adb
gcc/ada/sem_attr.adb