[Bug ada/98230] incorrect Type'Mod during a loop whose range is computed by a variable
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Dec 10 21:31:48 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98230
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Eric Botcazou
<ebotcazou@gcc.gnu.org>:
https://gcc.gnu.org/g:da6e672dc9bbedb993a5fea498954f0ca861b7ec
commit r9-9107-gda6e672dc9bbedb993a5fea498954f0ca861b7ec
Author: Ed Schonberg <schonberg@adacore.com>
Date: Thu Dec 10 22:26:57 2020 +0100
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.
More information about the Gcc-bugs
mailing list