]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Spurious link error with child unit and different Assertion modes.
authorEd Schonberg <schonberg@adacore.com>
Fri, 25 Jun 2021 13:54:17 +0000 (06:54 -0700)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 20 Sep 2021 12:31:32 +0000 (12:31 +0000)
commit325443d24bb480a2c75d36496f1ccc3fe2943968
tree6a6dcbc0402bd4488f5132788adf75eeeacd4cba
parent535a706f7e6ee32aab2b6c667d4d1b807d7ef1e6
[Ada] Spurious link error with child unit and different Assertion modes.

gcc/ada/

* exp_util.ads (Force_Evaluation): Add formal parameter
Discr_Number, to indicate discriminant expression for which an
external name must be created.
(Remove_Side_Effects): Ditto.
* exp_util.adb (Force_Evaluation): Call Remove_Side_Effects with
added parameter.
(Remove_Side_Effects, Build_Temporary): If Discr_Number is
positive, create an external name with suffix DISCR and the
given discriminant number, analogous to what is done for
temporaries for array type bounds.
* sem_ch3.adb (Process_Discriminant_Expressions): If the
constraint is for an object or component declaration and the
corresponding entity may be visible in another unit, invoke
Force_Evaluation with the new parameter.
gcc/ada/exp_util.adb
gcc/ada/exp_util.ads
gcc/ada/sem_ch3.adb