[Ada] Enumeration types with non-standard representation
The compiler may report errors on enumeration types with non-standard
representation (i.e. at least one literal has a representation value
different from its 'Pos value) processing attribute 'Enum_Rep.
It may also generate wrong code for the evaluation of 'Enum_Rep raising
Constraint_Error at runtime.
2018-08-21 Javier Miranda <miranda@adacore.com>
gcc/ada/
* checks.ads (Determine_Range): Adding documentation.
* checks.adb (Determine_Range): Don't deal with enumerated types
with non-standard representation.
(Convert_And_Check_Range): For conversion of enumeration types
with non standard representation to an integer type perform a
direct conversion to the target integer type.
gcc/testsuite/
* gnat.dg/enum4.adb: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263708
138bc75d-0d04-0410-961f-
82ee72b054a4