[Ada] Fix internal error on extended return and fixed-point result
authorEric Botcazou <ebotcazou@adacore.com>
Sat, 14 Nov 2020 15:12:04 +0000 (16:12 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 30 Nov 2020 14:16:20 +0000 (09:16 -0500)
commitc1a69c98717d9c63ffde67746c56243d530c9109
tree6767fb0010c1feca3ca5dc51413a51a2111d56e5
parentf7937111e8c8cfaf5ea79d97c65d6b6dc29b261f
[Ada] Fix internal error on extended return and fixed-point result

gcc/ada/

* contracts.adb (Check_Type_Or_Object_External_Properties): Make
sure to exclude all return objects from the SPARK legality rule
on effectively volatile variables.
* exp_ch6.adb (Expand_N_Extended_Return_Statement): Use the fast
track only when the declaration of the return object can be
dropped.
gcc/ada/contracts.adb
gcc/ada/exp_ch6.adb