]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Fix assertion failure on very peculiar enumeration type
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 21 Aug 2023 16:23:46 +0000 (18:23 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 5 Sep 2023 11:05:15 +0000 (13:05 +0200)
commit2f1cde4d511b9da6081b785f1c50b7e7aa271b4f
tree6ad42ed96d7646bd6445b7e5c1cbdf1cf9e7729c
parentea271bd907d91f6b417918677bd286b4c16d3440
ada: Fix assertion failure on very peculiar enumeration type

The compiler currently does not support the combination of a representation
clause on an enumeration type with a size clause whose value is greater than
the size of the largest machine scalar supported by the target.

Given that such a type would have little practical value, this change causes
the compiler to give a proper error message instead of aborting.

gcc/ada/

* freeze.adb (Freeze_Enumeration_Type): Give an error on a type with
both representation clause and too large size.
gcc/ada/freeze.adb