]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Fix detection of volatile expressions in restricted contexts
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 1 Mar 2021 15:39:31 +0000 (16:39 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 16 Jun 2021 08:43:04 +0000 (04:43 -0400)
commit07b7dc09b21d1a2f000f2861a87b017b764b38b4
treebe959e689cdd3fb00e55cd6adf0b0b0fbc4da815
parent207962b929cc771fd560c467f44efe8f9f679ac4
[Ada] Fix detection of volatile expressions in restricted contexts

gcc/ada/

* sem_res.adb (Flag_Effectively_Volatile_Objects): Detect also
allocators within restricted contexts and not just entity names.
(Resolve_Actuals): Remove duplicated code for detecting
restricted contexts; it is now exclusively done in
Is_OK_Volatile_Context.
(Resolve_Entity_Name): Adapt to new parameter of
Is_OK_Volatile_Context.
* sem_util.ads, sem_util.adb (Is_OK_Volatile_Context): Adapt to
handle contexts both inside and outside of subprogram call
actual parameters.
(Within_Subprogram_Call): Remove; now handled by
Is_OK_Volatile_Context itself and its parameter.
gcc/ada/sem_res.adb
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads