diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2016-11-13 18:29:45 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2016-11-13 18:29:45 +0000 |
commit | 476053121ba5fc4840146ef05a89636f5d37178c (patch) | |
tree | e7d03bb4d03b470483c5605caecb4e3580a3c7cf /gcc/ada | |
parent | c0c54de6a09b8b280f2b3091f0e2c0894eb6f9d8 (diff) | |
download | gcc-476053121ba5fc4840146ef05a89636f5d37178c.zip gcc-476053121ba5fc4840146ef05a89636f5d37178c.tar.gz gcc-476053121ba5fc4840146ef05a89636f5d37178c.tar.bz2 |
decl.c (gnat_to_gnu_entity): Look at the underlying type for the signedness of the type.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
Look at the underlying type for the signedness of the type.
From-SVN: r242361
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b3ac97c..695518d 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,10 @@ 2016-11-13 Eric Botcazou <ebotcazou@adacore.com> + * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>: + Look at the underlying type for the signedness of the type. + +2016-11-13 Eric Botcazou <ebotcazou@adacore.com> + * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Deal specially with negative constants. diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index b6fce3e..c023e31 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -1836,7 +1836,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) && esize == CHAR_TYPE_SIZE && flag_signed_char) gnu_type = make_signed_type (CHAR_TYPE_SIZE); - else if (Is_Unsigned_Type (Etype (gnat_entity)) + else if (Is_Unsigned_Type (Underlying_Type (Etype (gnat_entity))) || (Esize (Etype (gnat_entity)) != Esize (gnat_entity) && Is_Unsigned_Type (gnat_entity)) || Has_Biased_Representation (gnat_entity)) |