]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Fix spurious error for aggregate with box component choice
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 8 Jun 2022 11:14:46 +0000 (13:14 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 6 Jul 2022 13:29:47 +0000 (13:29 +0000)
commitc061e99b7dec27f2dd4f154b95dd42cd477bf6ef
treee8d9d8783702ab2caad007faea03b6663ac1d956
parentb33dd7874523af5c244fff3c45be1358815691e4
[Ada] Fix spurious error for aggregate with box component choice

It comes from the Volatile_Full_Access (or Atomic) aspect: the aggregate is
effectively analyzed/resolved twice and this does not work.  It is fixed by
calling Is_Full_Access_Aggregate before resolution.

gcc/ada/

* exp_aggr.adb (Expand_Record_Aggregate): Do not call
Is_Full_Access_Aggregate here.
* freeze.ads (Is_Full_Access_Aggregate): Delete.
* freeze.adb (Is_Full_Access_Aggregate): Move to...
(Freeze_Entity): Do not call Is_Full_Access_Aggregate here.
* sem_aggr.adb (Is_Full_Access_Aggregate): ...here
(Resolve_Aggregate): Call Is_Full_Access_Aggregate here.
gcc/ada/exp_aggr.adb
gcc/ada/freeze.adb
gcc/ada/freeze.ads
gcc/ada/sem_aggr.adb