[Ada] Ignore volatile restrictions in preanalysis
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 3 Mar 2021 19:15:56 +0000 (20:15 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 16 Jun 2021 08:43:05 +0000 (04:43 -0400)
commit1a9ff8d39c1f5a63755f2a8bb0a982c7af4ee817
treea5a5925693632156078ad4efaec6b99830b9b561
parent3feba0a578c364e6ca44ad5f954a30dc55e98065
[Ada] Ignore volatile restrictions in preanalysis

gcc/ada/

* sem_util.adb (Is_OK_Volatile_Context): All references to
volatile objects are legal in preanalysis.
(Within_Volatile_Function): Previously it was wrongly called on
Empty entities; now it is only called on E_Return_Statement,
which allow the body to be greatly simplified.
gcc/ada/sem_util.adb