[Ada] Fix PR ada/98230
Eric Botcazou
botcazou@adacore.com
Thu Dec 10 21:32:54 GMT 2020
It's a rather curious malfunction of the 'Mod attribute applied to the
variable of a loop whose upper bound is dynamic.
Tested on x86-64/Linux, applied on all active branches.
2020-12-10 Ed Schonberg <schonberg@adacore.com>
PR ada/98230
* exp_attr.adb (Expand_N_Attribute_Reference, case Mod): Use base
type of argument to obtain static bound and required size.
2020-12-10 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/modular6.adb: New test.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 998 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201210/9e80ad76/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: modular6.adb
Type: text/x-adasrc
Size: 336 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201210/9e80ad76/attachment-0001.bin>
More information about the Gcc-patches
mailing list