From 476053121ba5fc4840146ef05a89636f5d37178c Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sun, 13 Nov 2016 18:29:45 +0000 Subject: 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) : Look at the underlying type for the signedness of the type. From-SVN: r242361 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/gcc-interface/decl.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc/ada') 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 + * gcc-interface/decl.c (gnat_to_gnu_entity) : + Look at the underlying type for the signedness of the type. + +2016-11-13 Eric Botcazou + * gcc-interface/decl.c (annotate_value) : 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)) -- cgit v1.1