[Ada] Alignment may be specified as zero
authorBob Duff <duff@adacore.com>
Wed, 14 Aug 2019 09:52:54 +0000 (09:52 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 14 Aug 2019 09:52:54 +0000 (09:52 +0000)
commitff0889eb4d7f34270a6cddb3351fe8ee4fc9bbe0
tree5aef1abe0c82b06992ba02189c10df55d9cdcef7
parentf0539a7914cba3b7de76665a74edb90e30f2dbc9
[Ada] Alignment may be specified as zero

An Alignment clause or an aspect_specification for Alignment may be
specified as 0, which is treated the same as 1.

2019-08-14  Bob Duff  <duff@adacore.com>

gcc/ada/

* sem_ch13.adb (Get_Alignment_Value): Return 1 for Alignment 0,
and do not give an error.
* doc/gnat_rm/representation_clauses_and_pragmas.rst: Update the
corresponding documentation.
* gnat_rm.texi: Regenerate.

gcc/testsuite/

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

From-SVN: r274473
gcc/ada/ChangeLog
gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst
gcc/ada/gnat_rm.texi
gcc/ada/sem_ch13.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/alignment15.adb [new file with mode: 0644]