]> gcc.gnu.org Git - gcc.git/commit
Fix PR ada/98230
authorEd Schonberg <schonberg@adacore.com>
Thu, 10 Dec 2020 21:26:57 +0000 (22:26 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Thu, 10 Dec 2020 21:31:33 +0000 (22:31 +0100)
commitda6e672dc9bbedb993a5fea498954f0ca861b7ec
treeef7dece89a6ccb64b121e002264bde9c0d802be7
parentece29230d95b86c5e2ee169c629c9e2988c6c1ec
Fix PR ada/98230

It's a rather curious malfunction of the 'Mod attribute applied to the
variable of a loop whose upper bound is dynamic.

gcc/ada/ChangeLog:
PR ada/98230
* exp_attr.adb (Expand_N_Attribute_Reference, case Mod): Use base
type of argument to obtain static bound and required size.

gcc/testsuite/ChangeLog:
* gnat.dg/modular6.adb: New test.
gcc/ada/exp_attr.adb
gcc/testsuite/gnat.dg/modular6.adb [new file with mode: 0644]
This page took 0.061604 seconds and 6 git commands to generate.