[Ada] Spurious error on Old attribute reference in delta aggregate
authorEd Schonberg <schonberg@adacore.com>
Thu, 10 Sep 2020 19:57:06 +0000 (15:57 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 26 Oct 2020 08:59:00 +0000 (04:59 -0400)
commitcfc3a1db82cb6a11e9bdfc903f71fb116c9b6706
treec4af1863f29ca85f8e028c65520658060dd7bfcc
parentadf1c867c01eece19081c157d2c6bf05f7848c64
[Ada] Spurious error on Old attribute reference in delta aggregate

gcc/ada/

* sem_aggr.adb (Resolve_Delta_Array_Aggregate): For an
association that is an iterated component association, attach
the copy of the expression to the tree prior to analysis, in
order to preserve its context. This is needed when verifying
static semantic rules that depend on context, for example that a
use of 'Old appears only within a postcondition.
gcc/ada/sem_aggr.adb