[Ada] Spurious size error on fixed point type with aspect Small
authorEd Schonberg <schonberg@adacore.com>
Tue, 22 May 2018 13:20:26 +0000 (13:20 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 22 May 2018 13:20:26 +0000 (13:20 +0000)
commitf2df0100b287653c12f807c2e9d6a64d0982428f
tree97bfbd872c5c76d53e4338777630148c57efbc92
parentb8bbe7398f494f96ab33d9c4ee32c83f220d3543
[Ada] Spurious size error on fixed point type with aspect Small

This path fixes a spurious size error on a fixed point that carries an
aspect specification for the 'Small of the type, when there is a subsequent
derivation of that type before the type is frozen, the given 'Small is not
not a power of two, and the bounds of the type require its full size, also
given by an aspect specification.

2018-05-22  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* freeze.adb (Freeze_Fixed_Point_Type): If the first subtype has
delayed aspects, analyze them now, os that the representation of the
type (size, bounds) can be computed and validated.

gcc/testsuite/

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

From-SVN: r260511
gcc/ada/ChangeLog
gcc/ada/freeze.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/fixedpnt3.adb [new file with mode: 0644]