utils.c (type_unsigned_for_rm): New predicate.
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 11 Oct 2016 09:52:35 +0000 (09:52 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 11 Oct 2016 09:52:35 +0000 (09:52 +0000)
commit9fd7cd44d6634b4013a0c4ced3c2763881038dab
tree490989cf792d8522e167b83368abc2cb1eaf3af5
parent78f6129427265bd7ff088eda0a325210cb9051a2
utils.c (type_unsigned_for_rm): New predicate.

* gcc-interface/utils.c (type_unsigned_for_rm): New predicate.
(make_type_from_size): Use it.
(unchecked_convert): Likewise.  Do not skip the extension step if the
source type is not integral.

From-SVN: r240975
gcc/ada/ChangeLog
gcc/ada/gcc-interface/utils.c
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/unchecked_convert10.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/unchecked_convert11.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/unchecked_convert12.adb [new file with mode: 0644]