diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2019-07-22 13:57:04 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2019-07-22 13:57:04 +0000 |
commit | fd90c808628cead705bb4521d9b8beea0edcf2bf (patch) | |
tree | f8e4700d32a319c8b8d65fa46b4b2173abe99297 /gcc/tree-cfg.c | |
parent | 7ddc639b7717278075ab1989568d1769ccc040e1 (diff) | |
download | gcc-fd90c808628cead705bb4521d9b8beea0edcf2bf.zip gcc-fd90c808628cead705bb4521d9b8beea0edcf2bf.tar.gz gcc-fd90c808628cead705bb4521d9b8beea0edcf2bf.tar.bz2 |
[Ada] Fix missing Constraint_Error for Enum_Val attribute
This fixes an old issue involving the Enum_Val attribute: it does not
always raise a Constraint_Error exception when the specified value is
not valid for the enumeration type (instead a modulo computation is
applied to the value).
2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
gcc/ada/
* exp_attr.adb (Expand_N_Attribute_Reference)
<Attribute_Enum_Val>: Set No_Truncation on the
N_Unchecked_Type_Conversion built around the argument passed to
the attribute.
gcc/testsuite/
* gnat.dg/enum_val1.adb: New testcase.
From-SVN: r273676
Diffstat (limited to 'gcc/tree-cfg.c')
0 files changed, 0 insertions, 0 deletions