ada: Disable inlining in potentially unevaluated contexts
commit8c748260776d672949ce02c9aa93292e0d6bc206
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 3 May 2023 07:23:29 +0000 (3 09:23 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 13 Jun 2023 07:31:45 +0000 (13 09:31 +0200)
tree749aae246467aabac222a10a3755b319b21570c4
parentdcc601423c21a3902d6dd22d40a9a828ce9658b0
ada: Disable inlining in potentially unevaluated contexts

Instead of explicitly disabling inlining in quantified expressions,
(which happen to be only preanalysed) and then disabling inlining in
potentially unevaluated contexts that are fully analysed (which happen
to include quantified expressions), we now simply disable inlining in
all potentially unevaluated contexts, regardless of the full analysis
mode.

This also disables inlining in iterated component associations, which
can be both preanalysed or fully analysed depending on their expression,
but nevertheless are potentially unevaluated.

gcc/ada/

* sem_res.adb (Resolve_Call): Replace early call to
In_Quantified_Expression with a call to Is_Potentially_Unevaluated that
was only done when Full_Analysis is true.
gcc/ada/sem_res.adb