[Ada] Spurious warning on iteration over range of 64-bit modular type
authorEd Schonberg <schonberg@adacore.com>
Tue, 31 Jul 2018 09:55:48 +0000 (09:55 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 31 Jul 2018 09:55:48 +0000 (09:55 +0000)
commitc4a2e585d3b4e829f48fcb3c2a825584890b4fda
tree2c76177eefdccd1a103a4a6318068a90456d026c
parent1e739bf78ec49cdb24787d0447c6a44ff20a3a00
[Ada] Spurious warning on iteration over range of 64-bit modular type

This patch suppresses a spurious warning on the use of a 64-bit modular type
in a quantified expression, where the range of iteration will include a bound
that appears larger than the run-time representation of Universal_Integer'last.

2018-07-31  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* sem_eval.adb (Check_Non_Static_Context): Do not warn on an
integer literal greater than the upper bound of
Universal_Integer'Last when expansion is disabled, to avoid a
spurious warning over ranges involving 64-bit modular types.

gcc/testsuite/

* gnat.dg/iter3.adb: New testcase.

From-SVN: r263095
gcc/ada/ChangeLog
gcc/ada/sem_eval.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/iter3.adb [new file with mode: 0644]